use of PATH_TRANSLATED in wp-settings.php
|Reported by:||aronbeal||Owned by:|
In the latest SVN tagged revision (2.2.2) (and earlier, I believe), the wp-settings.php file makes use of the $_SERVER variable PATH_TRANSLATED. This variable seems to have been deprecated, as stated on the php.ini core directives page.
This is similar to a prior issue for a different file, posted in the trac awhile back.
This arises around line 40 in wp-settings.php on the copy I have; it should not have been modified since I checked it out from svn. It appears also in the latest subversion trunk revision (6110).
The particular usage is to assign its value to the server value for SCRIPT_FILENAME, even though php recommends explicitly using SCRIPT_FILENAME instead of PATH_TRANSLATED.
Relevant code in wp-settings.php (starting at line 38, [whitespace modified]):
// Fix for PHP as CGI hosts that set SCRIPT_FILENAME to something // ending in php.cgi for all requests if ( isset($_SERVER['SCRIPT_FILENAME']) && ( strpos($_SERVER['SCRIPT_FILENAME'], 'php.cgi') == strlen($_SERVER['SCRIPT_FILENAME']) - 7 ) ) $_SERVER['SCRIPT_FILENAME'] = $_SERVER['PATH_TRANSLATED'];