From: trevor dot wekel at autodesk dot com Operating system: Windows XP PHP version: 5.0.3 PHP Bug Type: Apache2 related Bug description: Setting Status: 559 works using php-cgi but not using Apache 2 module
Description: ------------ The following PHP script returns different HTTP response status codes when run using php-cgi.exe and run as a Apache module. Versions of software installed: PHP 5.0.3 zip donwloaded from Php.net http://www.php.net/get/php-5.0.3-Win32.zip/from/a/mirror Apache 2.0.52 from Apache.org http://apache.secsup.org/dist/httpd/binaries/win32/apache_2.0.52-win32-x86-no_ssl.msi I can also post my httpd.conf and php.ini files if required. No special tweaking was done other than the standard PHP setup for Apache 2 documented here: http://www.php.net/manual/en/install.windows.apache2.php Reproduce code: --------------- <?php 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 status code of 559 returned when running under both the php-cgi and the Apache 2 module. Actual result: -------------- When running under php-cgi, the 559 HTTP response status code is returned. When under the Apache 2 module, an HTTP 500 Internal Error is returned. Note: The "Status:" line is returned correctly but it does not match the response status code. -- Edit bug report at http://bugs.php.net/?id=31519&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31519&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31519&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31519&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31519&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31519&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31519&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31519&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31519&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31519&r=support Expected behavior: http://bugs.php.net/fix.php?id=31519&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31519&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31519&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31519&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31519&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31519&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31519&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31519&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31519&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31519&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31519&r=mysqlcfg