Author |
|
lektu
Joined: 20 Jan 2006 Posts: 5
|
Posted: Mon 10 Apr '06 12:30 Post subject: Error in MediaWiki with Apache 2.2.X and PHP 5.1.X |
|
|
Hi.
I've got a MediaWiki setup based on the following configuration:
Quote: | - Windows XP Professional
- Apache/2.2.1 (Win32)
- PHP/5.1.3RC3-dev
- MediaWiki 1.6.2
|
My problem is that every time I access a Special page from my MediaWiki setup (for example, http://localhost/wiki/Special:Version), though it does work, I get the following error message from Apache:
Quote: | [Mon Apr 10 12:08:43 2006] [error] [client 192.168.0.1] (20024)The given path misformatted or contained invalid characters: Cannot map GET /wiki/Especial:Specialpages HTTP/1.1 to file, referer: http://localhost/wiki/Portada
|
This didn't happen with Apache 2.0, and, according to the MediaWiki people, doesn't happen to them with 2.2 either.
So I've been thinking it could be an issue with the Windows port of Apache 2.2 or PHP (and BTW, it happens with 2.2.0 and PHP 5.1.2 too; I just updated to see whether it was fixed on the cutting edge versions).
Any idea?
Thanks,
Juanma |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 10 Apr '06 15:02 Post subject: |
|
|
Normaly it should work like in 2.0.x . I had programmed something in PHP that is like that URL. On my server it works (2.2.x and 2.0.x)
Maybe you used mod_rewrite in 2.0.x ?
There is something you can try. If you installed the 2.2.x in the same directority as the 2.0.x make a backup from the 2.2.x httpd.conf and use the old one from 2.0.x (if nessary change the pathes in the old httpd.conf)
Maybe you need to comment out some include files in the httpd.conf The configs had changed a bit. There are some file in the conf/extra folder now. |
|
Back to top |
|
lektu
Joined: 20 Jan 2006 Posts: 5
|
Posted: Mon 10 Apr '06 16:04 Post subject: |
|
|
I'm not using mod_rewrite. I use a few aliases, but I don't think that's the problem.
I can try to compare the old httpd.conf file with the 2.2.0 one (though the horrible breaking of httpd.conf into extra/* makes it a bit more difficult), but I don't think it is a setup issue. As I've said, people with similar setups on Apache 2.2.0 running on GNU/Linux do not experience the problem. |
|
Back to top |
|
lektu
Joined: 20 Jan 2006 Posts: 5
|
Posted: Tue 11 Apr '06 17:50 Post subject: |
|
|
I've been reading an old (c. 2003) thread on the Apache developer's list that talks about this very problem.
The APR lib (on Windows) thinks that colon is not valid in a filename, which is correct. However, the module generating the path should inform Apache that it takes care of the path and that it shouldn't need to be mapped to the filesystem.
I've done the following tests ("n/t" meaning "not tested"):
Code: |
Apache (Windows)
| 2.0.55 | 2.2.0 | 2.2.1 |
---------+----------+---------+---------+
P 5.0.5 | works | n/t | n/t |
H 5.1.2 | n/t | fails | fails |
P 5.1.3RC | works | fails | fails |
---------+----------+---------+---------+
|
Moreover, the combination PHP 5.1.2 / Apache 2.2.0 is reported to work on GNU/Linux (as expected; this is a Windows problem).
So, this is either:
- a problem in recent PHP that only shows on Apache for Windows, or
- a problem with the 2.2.X builds of Apache on Windows
Does the people who's building the binaries have any idea about what can be wrong? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 11 Apr '06 20:45 Post subject: |
|
|
Code: |
Apache (Windows)
| 2.0.55 | 2.2.0 | 2.2.1 |
---------+----------+---------+---------+
P 5.0.5 | works | n/t | n/t |
H 5.1.2 | n/t | works | works |
P 5.1.3RC | n/t | works | works |
---------+----------+---------+---------+
|
testet under XP SP2 no other updates, 2003 sever SP1 all updates.
My tests downloaded from PHP.net and php5ts.dll, php5apache2.dll and manifests from this page. |
|
Back to top |
|
lektu
Joined: 20 Jan 2006 Posts: 5
|
Posted: Wed 12 Apr '06 1:07 Post subject: |
|
|
James, does "works" in your test results matrix mean that MediaWiki works, or that you don't get the 20024 error from Apache about invalid characters when accessing Special pages?
If the latter, could you please post the setup of Apache 2.2.X you used on the tests?
Thanks,
Juanma |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 12 Apr '06 9:39 Post subject: |
|
|
I did not use an installer. I downloaded it and installed it manually.
------
edit:
Now I got the same error. But the wiki runs. I think you can ignore the error. The error is caused by the url, cause it contains the dobblepoint :
Apache knows that no file can have this name. But that is for the Database.
I think, but haven't testet yet, with mod_rewrite it should work without any error.
the new apache does not work with namespaces |
|
Back to top |
|
lektu
Joined: 20 Jan 2006 Posts: 5
|
Posted: Wed 12 Apr '06 10:05 Post subject: |
|
|
Yes, I know that I the wiki runs. However, this shouldn't happen. There's no point in Apache detecting that it cannot map the path to the filesystem; it should be informed that the path is being processed elsewhere.
And yes, I can ignore it, but I would rather not. I run that Apache on a USB stick, and I don't want unnecessary writes, so I've set it up to log only the most critical errors. Accessing Special pages in MediaWiki is hardly critical
All in all, the thing didn't happen in Apache 2.0 and doesn't happen on non-Windows environments, so it is a bug somewhere. |
|
Back to top |
|
MikeSchinkel
Joined: 18 Sep 2007 Posts: 3 Location: Atlanta, Georgia USA
|
Posted: Tue 18 Sep '07 5:43 Post subject: Is this bug going to be fixed? |
|
|
I'm having this bug on my Windows machine that I've set up for Mediawiki development. As it is, I'm dead in the water.
Am I going to have to revert to using IIS because Apache 2.2 can't work with PHP and Mediawiki? This is embarassing for Apache. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 18 Sep '07 18:59 Post subject: same bug? |
|
|
You are having this same bug (in Spanish)? Quote: | [Mon Apr 10 12:08:43 2006] [error] [client 192.168.0.1] (20024)The given path misformatted or contained invalid characters: Cannot map GET /wiki/Especial:Specialpages HTTP/1.1 to file, referer: http://localhost/wiki/Portada |
I do not experience this problem with MediaWiki version 1.11.0, in either English or Spanish.
I am using Apache 2.2.4 (from Apache Lounge) and mod_fcgid with PHP 5.2.2 and MySQL 5.0.48.
All Special-Pages links now properly go to URIs like /wiki/index.php?title=Special:Specialpages instead of /wiki/Especial:SpecialPages - either from Portata (Spanish) or Main Page (English).
re: "This is embarassing for Apache."
I don't think Apache is likely to be embarrassed by MediaWiki bugs.
-tom- |
|
Back to top |
|
MikeSchinkel
Joined: 18 Sep 2007 Posts: 3 Location: Atlanta, Georgia USA
|
Posted: Tue 18 Sep '07 21:34 Post subject: Re: same bug? |
|
|
tdonovan wrote: | You are having this same bug (in Spanish)? Quote: | [Mon Apr 10 12:08:43 2006] [error] [client 192.168.0.1] (20024)The given path misformatted or contained invalid characters: Cannot map GET /wiki/Especial:Specialpages HTTP/1.1 to file, referer: http://localhost/wiki/Portada | |
Who said anything about Spanish, smart guy? My error message would clearly be different than his as I have different wiki topics than he does.
tdonovan wrote: | I do not experience this problem with MediaWiki version 1.11.0, in either English or Spanish.
I am using Apache 2.2.4 (from Apache Lounge) and mod_fcgid with PHP 5.2.2 and MySQL 5.0.48.
All Special-Pages links now properly go to URIs like /wiki/index.php?title=Special:Specialpages instead of /wiki/Especial:SpecialPages - either from Portata (Spanish) or Main Page (English).
|
That's because you appear not to be using Well Designed URLs which is something, given the topic of the wiki, is not an option for me to consider, and ideally one nobody would ever consider. Your wiki that uses "title=" is less usable than one that uses clean URLs for Mediawiki and omits the title from the URL; as such your wiki does a disservice to your users.
tdonovan wrote: |
re: "This is embarassing for Apache."
I don't think Apache is likely to be embarrassed by MediaWiki bugs.
|
It is not a Mediawiki bug, it is a bug in Apache and has been documented as such as Bug 41441 in ASF Bugzilla.
So I repeat: it is a bug, it worked in Apache 1.3, and IIS does not have this problem so it is embarassing the Apache 2.2 does. The question was, is it going to be fixed? It can't be difficult. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 18 Sep '07 23:46 Post subject: |
|
|
Those are MediaWiki-generated URLs - not mine. Portada is "Main Page" in Spanish, not a topic.
That is also why the original poster's incorrect URL was /wiki/Especial:SpecialPages rather than /wiki/Special:SpecialPages.
Like the original poster, lektu, I was not using mod_rewrite. I used the default MediaWiki configuration to test - not the "better ideas from welldesignedurls.org" config. The instructions do not appear to be appropriate to WikiMedia 1.11.0. There is no reference to $wgArticlePath in LocalSettings.php for version 1.11.0.
re:"Am I going to have to revert to using IIS" - That would be my recommendation.
-tom- |
|
Back to top |
|
MikeSchinkel
Joined: 18 Sep 2007 Posts: 3 Location: Atlanta, Georgia USA
|
Posted: Wed 19 Sep '07 0:06 Post subject: |
|
|
Quote: | Those are MediaWiki-generated URLs - not mine. Portada is "Main Page" in Spanish, not a topic. That is also why the original poster's incorrect URL was /wiki/Especial:SpecialPages rather than /wiki/Special:SpecialPages. |
I'm confused, you were the one who brought up the spanish aspect, not me. Why did you bring it up when it wasn't part of the issue?
Quote: | Like the original poster, lektu, I was not using mod_rewrite. I used the default MediaWiki configuration to test - not the "better ideas from welldesignedurls.org" config. |
Maybe you should test with mod_rewrite then? It is what Wikipedia uses.
Quote: | The instructions do not appear to be appropriate to WikiMedia 1.11.0. There is no reference to $wgArticlePath in LocalSettings.php for version 1.11.0. |
I don't know about that, the instructions were written last year, something to update maybe. But that's not the point, the point is fixing the bug in Apache to allow for well designed URLs.
Quote: | re:"Am I going to have to revert to using IIS" - That would be my recommendation. |
That was a rhetorical question to point out deficiencies in Apache, the software so many present as if it were above comparison to IIS. I'd like Apache to be better than IIS, and that's why I asked about this documented bug being fixed. |
|
Back to top |
|