Doc #52485 [NEW]: provided example doesn't work in all circumstances

From: Date: Thu, 29 Jul 2010 10:39:22 +0000
Subject: Doc #52485 [NEW]: provided example doesn't work in all circumstances
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4769@lists.php.net to get a copy of this message
From: Operating system: FreeBSD-8.1 PHP version: 5.3.3 Package: Documentation problem Bug Type: Documentation Problem Bug description:provided example doesn't work in all circumstances Description: ------------ The sample code to return 404 is incorrect for FastCGI mode. in FastCGI mode it would return 200, unless "header('Status: 404 File not found');" would be added. This means 'Status: *' is the third special-case header call besides 'HTTP/1.*' and 'Location: *' Test script: --------------- <?php header('Status: 404 Dead beef.') ?> This will return 404 for FastCGI request. <?php header('HTTP/1.0 404 Dead beef.') ?> This will return 404 for CGI request. You need to specify both to get code working under all circumstances. -- Edit bug report at http://bugs.php.net/bug.php?id=52485&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52485&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52485&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52485&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52485&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52485&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52485&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52485&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52485&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52485&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52485&r=support Expected behavior: http://bugs.php.net/fix.php?id=52485&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52485&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52485&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52485&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52485&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52485&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52485&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52485&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52485&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52485&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52485&r=mysqlcfg

« previous php.doc.bugs (#4769) next »