From: jg at b-one dot net Operating system: Linux (Debian) PHP version: 4CVS-2004-06-08 (stable) PHP Bug Type: Unknown/Other Function Bug description: Bogus character in PCRE + Safemode + WWW-authenticate header error
Description: ------------ A bogus character (a nul before \r\n) is returned from header('WWW-Authenticate: Basic realm="ABC"'); Which causes mod_fcgi to "internal server error". It only happens with safemode and pcre-regexp Reproduce code: --------------- <? header("HTTP/1.1 401 Unauthorized"); header("WWW-Authenticate: Basic realm=\"ABC\""); ?> Expected result: ---------------- "In emacs display" Status: 401^M Content-type: text/html^M X-Powered-By: PHP/4.3.7^M WWW-Authenticate: Basic realm="ABC-1000"^M ^M Actual result: -------------- Status: 401^M Content-type: text/html^M X-Powered-By: PHP/4.3.7^M WWW-Authenticate: Basic realm="ABC-1000"[EMAIL PROTECTED] ^M Notice ^@ in output. Hexdump of last part. 3130 3030 2200 0d0a 0d0a 1000" NULL \r\n\r\n -- Edit bug report at http://bugs.php.net/?id=28692&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28692&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28692&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28692&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28692&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28692&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28692&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28692&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28692&r=support Expected behavior: http://bugs.php.net/fix.php?id=28692&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28692&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28692&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28692&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28692&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28692&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28692&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28692&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28692&r=float