From: jg at b-one dot net Operating system: Linux (Debian) PHP version: 4CVS-2004-06-07 (stable) PHP Bug Type: Unknown/Other Function Bug description: PCRE + Safemode + WWW-authenticate header error
Description: ------------ pcre-regexp + safemode affects output of header("WWW-Authenticate: Basic realm=\"ABC\"); and causes internal server error with mod_fcgi. The problem is in 4.3.7 and latest stable cvs 2004-06-07 In safemode without pcre-regexp php return WWW-Authenticate: Basic realm="1000" With pcre-regexp php returns WWW-Authenticate: Basic realm="ABC-1000" I suspect the extra space between key and value to cause mod_fcgi to "internal server error". Reproduce code: --------------- <? header("HTTP/1.1 401 Unauthorized"); header("WWW-Authenticate: Basic realm=\"ABC\""); echo "I need your credentials"; ?> Expected result: ---------------- Status: 401 Content-type: text/html X-Powered-By: PHP/4.3.7 WWW-Authenticate: Basic realm="ABC-1000" Actual result: -------------- without pcre-regexp: Status: 401 Content-type: text/html X-Powered-By: PHP/4.3.7 WWW-Authenticate: Basic realm="1000" with pcre-regexp: Status: 401 Content-type: text/html X-Powered-By: PHP/4.3.7 WWW-Authenticate: Basic realm="ABC-1000" (notice extra space) -- Edit bug report at http://bugs.php.net/?id=28670&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28670&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28670&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28670&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28670&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28670&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28670&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28670&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28670&r=support Expected behavior: http://bugs.php.net/fix.php?id=28670&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28670&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28670&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28670&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28670&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28670&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28670&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28670&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28670&r=float