Project

General

Profile

Actions

Bug #97543

closed

Correctly resolve instance script path

Added by Oliver Hader about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2022-05-03
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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" 

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #89312: NormalizedParams->getSiteUrl() contains PHP script wrapperClosed2019-09-30

Actions
Related to TYPO3 Core - Bug #90155: Wrong status code with message "Unable to determine path to entry script."Closed2020-01-20

Actions
Actions #1

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Oliver Hader about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Gerrit Code Review about 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

Actions #5

Updated by Oliver Hader about 2 years ago

  • Related to Bug #89312: NormalizedParams->getSiteUrl() contains PHP script wrapper added
Actions #6

Updated by Markus Klein about 2 years ago

Just a note: cgi.fix_pathinfo = 1 seems to be the default on the official PHP FPM docker images.

Actions #7

Updated by Gerrit Code Review about 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

Actions #8

Updated by Gerrit Code Review about 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

Actions #9

Updated by Oliver Hader almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #10

Updated by Stefan Bürk almost 2 years ago

  • Related to Bug #90155: Wrong status code with message "Unable to determine path to entry script." added
Actions #11

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF