|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36400 Custom 5xx error does not return correct HTTP response error code
Submitted: 2006-02-15 10:12 UTC Modified: 2006-02-15 12:11 UTC
From: paolo at casarini dot org Assigned:
Status: Closed Package: Apache related
PHP Version: 5.1.2 OS: Linux version 2.4.27-2-386
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: paolo at casarini dot org
New email:
PHP Version: OS:


 [2006-02-15 10:12 UTC] paolo at casarini dot org
When running PHP as an Apache module (Apache/1.3.34 (Debian) PHP/5.1.2-1.dotdeb.2 mod_ssl/2.8.25 OpenSSL/0.9.8), the
response error code for a custom error is not correctly 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 response code returned is 500.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-15 12:11 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 08 06:01:28 2023 UTC