Hi all, My host got back to me regarding the odd infinite redirection of my Wiki, and said that it's caused by the fact that PHP5 on my shared server is run using CGI, which is apparently not compatible with MediaWiki. Is there a way to change that, or should I just stick with ver. 1.6, since the Apache module on my server uses PHP4? Thanks, -Azurite
On 26/06/07, Azurite azurite@seventh-star.net wrote:
Hi all, My host got back to me regarding the odd infinite redirection of my Wiki, and said that it's caused by the fact that PHP5 on my shared server is run using CGI, which is apparently not compatible with MediaWiki. Is there a way to change that, or should I just stick with ver. 1.6, since the Apache module on my server uses PHP4?
"Infinite redirection" problems are often due to incorrect path settings in LocalSettings.php, which causes MediaWiki to redirect requests to an (incorrect) URL which it believes to be the canonical form.
One thing that strikes me about moving from an Apache module to a CGI module for PHP is that the default "prettified" URL mechanism, i.e. /path/to/mediawiki/index.php/Page_title won't work too well, since CGI and PATHINFO have a relationship founded upon hatred.
Check that the paths, such as $wgScriptPath (and $wgScript, if set) are correct in LocalSettings.php. Also check that $wgArticlePath is set to "{$wgScript}?title=$1" as opposed to the default, "prettier" form - while MediaWiki detects this during installation, it won't detect it if the PHP configuration changes.
Note that as far as I know, the mod_rewrite module will still work when rewriting URLs, so you can still have a "pretty URL" scheme if you want.
Rob Church
Ah, okay! I didn't even see that line in LocalSettings.php (because normally all I do is add extensions to the top/bottom). The part Rob mentioned was commented out. Now here's what it looks like, but I haven't uploaded it yet. Does this look okay?
$wgScriptPath = "/wikific"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
## If using PHP as a CGI module, use the ugly URLs $wgArticlePath = "$wgScript/$1"; $wgArticlePath = "{$wgScript}?title=$1;
Also, when you access my Wiki now, it appears to be the old 1.6 version, even though I ran the upgrade script using SSH (and it said it was successful). My host said that they commented the line in .htaccess that switched my site to use PHP5, but I don't think they would have restored the folder with the 1.10 files to the 1.6 files-- do I have to upload everything again, or is this just some sort of fluke because the current configuration isn't seeing PHP5 (since it was commented out)?
Also, the change I made to the LocalSettings.php-- if I were to upload it, would it take effect immediately, or would I need to re-upload the 1.10 files/re-run the upgrade script? Thanks, -Azurite
On 26/06/07, Azurite azurite@seventh-star.net wrote:
Does this look okay?
$wgScriptPath = "/wikific"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php";
## If using PHP as a CGI module, use the ugly URLs $wgArticlePath = "$wgScript/$1"; $wgArticlePath = "{$wgScript}?title=$1;
Yes.
Also, when you access my Wiki now, it appears to be the old 1.6 version, even though I ran the upgrade script using SSH (and it said it was successful). My host said that they commented the line in .htaccess that switched my site to use PHP5, but I don't think they would have restored the folder with the 1.10 files to the 1.6 files-- do I have to upload everything again, or is this just some sort of fluke because the current configuration isn't seeing PHP5 (since it was commented out)?
Er, no; check the top of includes/DefaultSettings.php to see what $wgVersion is set to - if it's 1.6.x, then someone has been messing about with the files.
Also, the change I made to the LocalSettings.php-- if I were to upload it, would it take effect immediately, or would I need to re-upload the 1.10 files/re-run the upgrade script?
It would take immediate effect.
Rob Church
Huzzah, I got it working! There was a quotation mark missing from the snippet I had from LocalSettings.php, but I quickly found it and fixed it. It also turned out that my host HAD been messing with my files-- oddly, they created a folder wikific and another, wikific-old. But both of them seemed to have the exact same content (even though I expected wikific-old to have the 1.10 files that I'd uploaded a few days ago), according to the version check I did of includes/DefaultSettings.php I reuploaded all the files and now everything's working! Thank you so much! -Azurite
mediawiki-l@lists.wikimedia.org