Edit report at http://bugs.php.net/bug.php?id=52351&edit=1

 ID:               52351
 Comment by:       giorgio dot liscio at email dot it
 Reported by:      giorgio dot liscio at email dot it
 Summary:          Cannot send http status code without set new header
                   raw
 Status:           Bogus
 Type:             Bug
 Package:          HTTP related
 Operating System: all? Windows xp x64
 PHP Version:      5.3.2

 New Comment:

hi rasmus it's an honor to talk with you :)



header($_SERVER['SERVER_PROTOCOL'] . " 404 Not Found");



you don't think that this is actually hard to manage?



in plus, it is implemented in user space when it is already implemented
by php



i don't like this



to make writing these things to the user increases the risk of bugs /
incompatibilities with clients


Previous Comments:
------------------------------------------------------------------------
[2010-07-15 20:08:40] ras...@php.net

As documented at http://php.net/header, you would do it like this:



header("HTTP/1.0 404 Not Found");

------------------------------------------------------------------------
[2010-07-15 20:02:11] giorgio dot liscio at email dot it

Description:
------------
hi, if i want only to send an http status code in php with the function
header()

i must specify something on the first parameter otherwise the header is
not sent



i want only to set 404 status code.. but none of those works



header("", TRUE, 404);

header(NULL, TRUE, 404);



but i need to use



header("X-Totally-Useless: true", TRUE, 404);



is this a bug?



thank you





------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52351&edit=1

Reply via email to