Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8237 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88972 invoked by uid 1010); 27 Feb 2004 17:42:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88892 invoked from network); 27 Feb 2004 17:42:30 -0000 Received: from unknown (HELO sapo.pt) (212.55.154.22) by pb1.pair.com with SMTP; 27 Feb 2004 17:42:30 -0000 Received: (qmail 4457 invoked from network); 27 Feb 2004 17:42:22 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.154) by relay2 with SMTP; 27 Feb 2004 17:42:22 -0000 Received: (qmail 21449 invoked from network); 27 Feb 2004 17:40:58 -0000 Received: from unknown (HELO pc07653) (nunoplopes@sapo.pt@[81.193.156.232]) (envelope-sender ) by mta4 (qmail-ldap-1.03) with SMTP for ; 27 Feb 2004 17:40:58 -0000 Message-ID: <000001c3fd59$926cdaf0$0100a8c0@pc07653> To: "Rasmus Lerdorf" Cc: "PHPdev" References: <001301c3fd39$d808e290$0100a8c0@pc07653> Date: Fri, 27 Feb 2004 15:56:07 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: [PHP-DEV] Fw: [PHP-DOC] #27345 [Opn]: Status header with PHP CGI From: nlopess@php.net ("Nuno Lopes") So, what shall I do? Mark this bug as bogus or update the documentation. If yes, what should I add/remove/modify? Nuno ----- Original Message ----- > Unless of course there is code in there to look for HTTP/ and set the > appropriate status code. This code used to be there, but it may have > gotten dropped along the way. > > -Rasmus > > On Fri, 27 Feb 2004, Nuno Lopes wrote: > > > Can anybody clarify this, please? > > Nuno > > > > > > ----- Original Message ----- > > > > > ID: 27345 > > > Updated by: nlopess@php.net > > > Reported By: php_bugs at ecora dot de > > > Status: Open > > > Bug Type: Documentation problem > > > PHP Version: Irrelevant > > > New Comment: > > > > > > I couldn't reproduce this in PHP 5. > > > > > > header("HTTP/1.0 404 Not Found"); print "Status: 404" > > > > > > and > > > > > > header("Status: 404 Not Found"); prints "Status: 404 Not Found" > > > > > > > > > Can anybody check this in PHP 4? > > > > > > > > > Previous Comments: > > > ------------------------------------------------------------------------ > > > > > > [2004-02-22 05:10:36] php_bugs at ecora dot de > > > > > > Description: > > > ------------ > > > Hi, > > > > > > > > > header("HTTP/1.0 404 Not Found"); > > > [...] > > > Note: In PHP 3, this only works when PHP is compiled as an Apache > > > module. You can achieve the same effect using the Status header. > > > header("Status: 404 Not Found"); > > > > > > > > > IMHO this is not correct. Because the HTTP-status-header (also > > > Content-Type- and Location-Header) is always a server parsed header, > > > when PHP (PHP3, PHP4, PHP5 or also Perl or Python, ...) runs via CGI. > > > > > > The official CGI Specification (see http://www.w3.org/CGI/): > > > http://hoohoo.ncsa.uiuc.edu/cgi/out.html > > > > > > That means not only in PHP3 also in PHP4 or PHP5: When PHP runs via > > > CGI, then you have to write: > > > header("Status: 404 Not Found"); instead of header("HTTP/1.0 404 Not > > > Found"); > > > > > > > > > > > > > > > Reproduce code: > > > --------------- > > > When i try to send a header("HTTP/1.0 404 Not Found"); on my > > > installation (Apache 1.3.29 + PHP 4.2.3 CGI on Linux) then i receive a > > > 500 internal server error > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > > > > -- > > > Edit this bug report at http://bugs.php.net/?id=27345&edit=1