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

Also available in: Atom PDF