Last modified: 2008-02-12 22:51:03 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 T10007, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 8007 - Wrong redirect (PHP as CGI, PATH_INFO)
Wrong redirect (PHP as CGI, PATH_INFO)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.9.x
PC Windows Server 2003
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-22 13:52 UTC by Serguei Trouchelle
Modified: 2008-02-12 22:51 UTC (History)
0 users

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


Attachments

Description Serguei Trouchelle 2006-11-22 13:52:29 UTC
I'm using last svn version (17851), update.php applied.

When trying to get any page, I receive such headers:

HTTP/1.0 301 Moved Permanently
Date: Wed, 22 Nov 2006 13:47:44 GMT
Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2
mod_gzip/1.3.26.1a PHP/4.4.4 mod_ssl/2.8.22 OpenSSL/0.9.7e
Cache-Control: private, must-revalidate, max-age=0
Content-Encoding: gzip
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Vary: Accept-Encoding,Cookie
X-Powered-By: PHP/5.1.2
Last-Modified: Wed, 22 Nov 2006 13:47:45 GMT
Location: http://wiki.rw.kiev.ua/index.php?title=Index.php
Content-Type: text/html

After that, browser goes to infinite loop.
Comment 1 Shinjiman 2006-11-23 19:01:58 UTC
What is your MySQL version? The version 5 of MySQL is recommended.

And donno what's wrong with your php version, it have both Server: PHP/4.4.4 and X-
Powered-By: PHP/5.1.2 entries respectively.
Comment 2 Rob Church 2006-11-23 21:04:07 UTC
Actually, we don't recommend MySQL 5 as such.
Comment 3 Serguei Trouchelle 2006-11-27 14:27:18 UTC
MySQL version is  5.0.24a.
PHP4 is used as mod_php and PHP5 used for CGI. Actually, PHP5 is used for
index.php processing. 

Anything worked perfectly ont his configuration until I run some recent svn
checkout. 

I've added 
print "TITLE: $title" after line 15 of index.php, and it return "TITLE:
index.php" for every request with "redirect=no" in URL. 

I've copied index.php to run.php and tried to open
/run.php?title=Main_Page&redirect=no -- "TITLE: run.php" is shown then.

Can it be something with index.php elimination? I have 
$wgArticlePath      = "$wgScript?title=$1"; 

in LocalSettings.php, but maybe something is wrong with it?
Comment 4 Brion Vibber 2006-11-29 22:20:12 UTC
It looks like you've got broken PATH_INFO on this box.

1) Can you check whether 'cgi.fix_pathinfo' is set in php config? (Unfortunately this doesn't
seem to be checkable directly from within PHP; for 1.9 we check indirectly but it may not
always be working right.)

Try setting cgi.fix_pathinfo explicitly to 'on' and to 'off' in php.ini (and restart as necessary;
FastCGI daemons may still be running)


2) Check contents of PATH_INFO and ORIG_PATH_INFO. Make a PHP 5 script containing:

<?php
echo htmlspecialchars($_SERVER["PATH_INFO"]);
echo "<br>";
echo htmlspecialchars($_SERVER["ORIG_PATH_INFO"]);
?>

and go to http://example.com/scriptname.php/Foobar (as appropriate).

What do they contain?


3) If possible, provide details of Apache configuration so it can be reproduced.



If necessary, you should be able to work around this by setting $wgUsePathInfo = false;
in LocalSettings.php. This will suppress use of the PATH_INFO bits, which are apparently
coming through corrupt.
Comment 5 Tim Starling 2006-12-15 13:49:46 UTC
Reducing priority/severity. Redirect problems are a common complaint when
setting up a new wiki. Perhaps we could do more to detect or prevent them, but
they can always be fixed with proper configuration.
Comment 6 Brion Vibber 2008-02-12 22:51:03 UTC
This was probably resolved by the new title interpolation in 1.10/1.11. Resolved as FIXED; if problems continue, please test with the upcoming 1.12 release and reopen with details.

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


Navigation
Links