Using MediWiki 1.17.0 on a server with FastCGI. After a few minutes, the css is not loaded anymore.
With Firebug I see that the URL http://example.com/mw/load.php?debug=false&lang=nl&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&* gives a 500 Internal Server Error.
In the apache log it says:
.. "/var/www/xxx/cgi-bin/php" aborted: error parsing headers: duplicate header 'Status', ..
In includes\resourceloader\ResourceLoader.php I found the following code in the respond() function:
header( 'HTTP/1.0 304 Not Modified' );
header( 'Status: 304 Not Modified' );
I found that FastCGI does not like it when you send a Status header like that. The problem disappears when I change these lines into:
if ( substr(php_sapi_name(), 0, 3) == 'cgi' ) {
@header("HTTP/1.1 304 Not Modified");
} else {
@header("Status: 304 Not Modified");
}
I wonder if this is the right solution (no way: hacking core is never the right solution). I googled and searched, but did not find anyone else with the same problem. Is FastCGI not used by many? Or is there something else very strange in my case only?
PHP 5.2.4 (FastCGI)
MediaWiki 1.17.0
MySQL 5.0.51a