Hi everyone,
I've got the following (very basic !) code that worked fine on my PHP 4.1 (IIS 5.0) but after upgrading to PHP 4.3 (IIS 6.0) it doesn't work anymore.
The goal is to send back a 404 error message whenever certain conditions are met.
if ($error_condition) {
header("HTTP/1.0 404 Not Found");
exit();
};
with PHP 4.1 it returned me only the 404 header :
"HTTP/1.0 404 Not Found"
but as of PHP 4.3 it always returns an additional "Content-Type: text/html" header which makes my IIS (6.0) to return a
"404 Undescribed" error ! Such a header disables the default 404 page, and displays an empty document.
I tried differents settings in the PHP.INI but I can't manage to make it work.
I believe this is a PHP 4.3 issue and not an IIS 6.0 one as when I use a perl script to send the 404 error the only returned header is the 404 one, no content-type.
Has anyone got a clue about how to remove the Content-type header (or prevent its generation) ?
Thanks