Project

General

Profile

Actions

Bug #76685

closed

CLI: Calculated absolute path to typo3/sysext is wrong if calling from CGI-context

Added by Rene K almost 8 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-06-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I have tried to execute the cli_dispatch.phpsh under PHP7 as CLI - it says that the calculated path cannot be found.

Indeed, SystemEnvironmentBuilder::getPathThisScriptCli() returns "/usr/local/bin/php", not the path to the script because it relies to $_SERVER: argv or $_ENV:_ which were both not set in my environment.

The solution was to use another interpreter (php_cli instead of php).

Conclusion:
- getPathThisScriptCli() should throw a warning if $_SERVER:argv & $_ENV:_ are not set.
- Note that the index $_SERVER:PWD was also available, but it fails reading it because $isRelativePath was false.

Actions #1

Updated by Benni Mack about 4 years ago

  • Status changed from New to Needs Feedback

Hey Rene,

so you actually used a CGI binary used in CLI context?

Actions #2

Updated by Benni Mack over 3 years ago

  • Status changed from Needs Feedback to Closed

Closing this issue in lack of feedback.

Actions

Also available in: Atom PDF