|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31887 Custom 5xx error does not return correct HTTP response message
Submitted: 2005-02-08 17:48 UTC Modified: 2005-04-17 05:39 UTC
From: trevor dot wekel at autodesk dot com Assigned:
Status: Closed Package: IIS related
PHP Version: 5CVS-2005-03-05 OS: Windows XP
Private report: No CVE-ID: None
 [2005-02-08 17:48 UTC] trevor dot wekel at autodesk dot com
When running PHP as an ISAPI extension under IIS 5.1 / Windows XP, the response message for a custom error is not returned.

Reproduce code:
header("HTTP/1.1 559 CustomError");
header("Status: 559 CustomError");
echo "<html>\n";
echo "<body>\n";
echo "Error on page!!!\n";
echo "</body>\n";
echo "</html>\n";

Expected result:
I would expect to see an HTTP response code of 559 with a response message of "CustomError".

Actual result:
The HTTP 559 response code is returned correctly but the response message comes back as "Undescribed".

When running php as a CGI under IIS, this problem does not occur.  Both the response code and response message come back correctly.

The problem does not occur under Apache 2.0 / Windows XP when running as either a CGI or an Apache module.

Bug #31519 is a related and fixed bug under Apache 2.
Bug #31065 may also be a related bug under Apache / Linux.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-05 19:19 UTC] trevor dot wekel at autodesk dot com
Under IIS, the HTTP response message still came back as "Undescribed" and not "CustomError".  Do you need any additional information, such as my php.ini file?   

I downloaded and tested against  phpinfo() through IIS using php5isapi.dll version showed the Build Date as "Mar 5 2005 18:15:07" so I'm fairly sure I was using the latest version of PHP.
 [2005-04-17 05:39 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 12:01:26 2023 UTC