Last modified: 2011-04-14 15:11:30 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T16614, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 14614 - Link in NoLocalSettings.php is incorrect when using php-fastcgi
Link in NoLocalSettings.php is incorrect when using php-fastcgi
Status: NEW
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.12.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-22 18:39 UTC by Patrick Kuijvenhoven
Modified: 2011-04-14 15:11 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Patrick Kuijvenhoven 2008-06-22 18:39:00 UTC
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
Comment 1 Siebrand Mazeland 2008-08-13 20:07:50 UTC
+testme
Comment 2 Chad H. 2009-09-03 14:41:10 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links