Bug #97543
closedCorrectly resolve instance script path
100%
Description
Calling an URL like https://ip12.anyhost.it/index.php/invalid
leads to various errors and side-effects, e.g.
# TYPO3 v12-dev Fatal error: Uncaught RuntimeException: Could not create directory "vhosts/ip12.local/index.php/typo3temp/var/log/"! in typo3/main/typo3/sysext/core/Classes/Utility/GeneralUtility.php:1788 # TYPO3 v11 Fatal error: Uncaught RuntimeException: Could not create directory "vhosts/ip11.local/index.php/typo3temp/var/log/"! in typo3/branches/11.5/typo3/sysext/core/Classes/Utility/GeneralUtility.php:1948 # TYPO3 v10 Warning: require(vhosts/ip10.local/index.php/typo3/sysext/core/Configuration/DefaultConfiguration.php): failed to open stream: No such file or directory in typo3/branches/10.4/typo3/sysext/core/Classes/Configuration/ConfigurationManager.php on line 92
This behavior seems to occur only on web-servers using Apache with PHP-CGI or PHP-FPM, using PHP setting cgi.fix_pathinfo = 1
.
In this particular scenario, relevant $_SERVER
properties were like the following:
["ORIG_PATH_TRANSLATED"]=> string(59) "/vhosts/ip12.local/index.php/invalid" ["PATH_TRANSLATED"]=> string(49) "/vhosts/ip12.local/invalid" ["ORIG_SCRIPT_FILENAME"]=> string(42) "/anything/apache2/fcgid/php81/wrapper" ["SCRIPT_FILENAME"]=> string(51) "/vhosts/ip12.local/index.php"
Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74504
Updated by Oliver Hader over 2 years ago
- Related to Bug #89312: NormalizedParams->getSiteUrl() contains PHP script wrapper added
Updated by Markus Klein over 2 years ago
Just a note: cgi.fix_pathinfo = 1
seems to be the default on the official PHP FPM docker images.
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74505
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74506
Updated by Oliver Hader over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 24c5608cae28cdc47a84aa3058e86afbc7ab1bb2.
Updated by Stefan Bürk over 2 years ago
- Related to Bug #90155: Wrong status code with message "Unable to determine path to entry script." added