Page MenuHomePhabricator

Link in NoLocalSettings.php is incorrect when using php-fastcgi
Closed, InvalidPublic

Description

Author: pet

Description:
The main page will contain an incorrect link to the config directory when mediawiki hasn't been setup yet and php-fastcgi is being used.

This is what index.php will "print" in such a case: Please <a href="/php-fastcgi/php5-fcgi.shconfig/index.php" title='setup'> set up the wiki</a> first.

Relevant variables in $_SERVER:

Array
(
    [SCRIPT_FILENAME] => /data/hosting/xxx/php-fastcgi/php5-fcgi.sh
    [REDIRECT_URL] => /~myuser/test.php
    [REQUEST_URI] => /~myuser/test.php
    [SCRIPT_NAME] => /php-fastcgi/php5-fcgi.sh
    [PATH_INFO] => /~myuser/test.php
    [PATH_TRANSLATED] => /data/hosting/xxx/htdocs/~myuser/test.php
    [PHP_SELF] => /~myuser/test.php
)

Relevant files:

includes/templates/NoLocalSettings.php


Version: 1.12.x
Severity: minor

Details

Reference
bz14614

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:15 PM
bzimport set Reference to bz14614.
bzimport added a subscriber: Unknown Object (MLST).

Googled this a bit. You can set your $_SERVER vars in your fastcgi config files, and I saw a few examples where SCRIPT_NAME was set to the fastcgi script. In those situations this bug will occur, since NoLocalSettings builds its URL from SCRIPT_NAME.

Any reason we can't just use PHP_SELF here?

Kizule subscribed.

Version 1.12.x is not supported. Task is 10 years old. Everything works as expected.

So, I closing this task as invalid.