Re: [PHP] HTTP status code
No, I'm creating remote service and it's returning codes according to passed parameters. I only wanted to test it using browsers... I do not care about the output actually, but the status code B. It seems to me, that this is more html-related. Maybe the tags in the html-document screws it up regarding to the use of html. IE is more insensitive regarding correct typing of html-tags. header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); Why do you have ' on the first line and on the second? /Gustav Wiberg Jasper Bryant-Greene wrote: The default Apache error handler is not called when PHP sends a 404 header. The code that does Apache error handling happens *before* PHP gets in the loop, and checks to see if the script being referenced exists, which it indeed does, whether it sends a 404 header or not. Tested on Apache 2.2 with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP status code
Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
The default Apache error handler is not called when PHP sends a 404 header. The code that does Apache error handling happens *before* PHP gets in the loop, and checks to see if the script being referenced exists, which it indeed does, whether it sends a 404 header or not. Tested on Apache 2.2 with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HTTP status code
No, I'm creating remote service and it's returning codes according to passed parameters. I only wanted to test it using browsers... I do not care about the output actually, but the status code B. Jasper Bryant-Greene wrote: The default Apache error handler is not called when PHP sends a 404 header. The code that does Apache error handling happens *before* PHP gets in the loop, and checks to see if the script being referenced exists, which it indeed does, whether it sends a 404 header or not. Tested on Apache 2.2 with PHP 5.1. If you really want to get the default Apache error handler to appear then either readfile() it or redirect to it. Jasper Anthony Ettinger wrote: well, you typically would redirect 404 to something like foo.com/404.html Otherwise, it's whatever your server (apache/IIS) has as the default 404 handler... Default is something like this: Not Found The requested URL /asdf was not found on this server. Apache Server at foo.org Port 80 On 3/30/06, Jasper Bryant-Greene [EMAIL PROTECTED] wrote: In other words, if you want Firefox/Opera/etc to display something, you have to output something. Strange, that. :P Jasper Anthony Ettinger wrote: Then it's workingFireFox, et. al. show you the server 404, IE on the otherhand has it's own 404 error page (for those newbies who don't know what a 404 is). You can disable it under IE options. On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Yes, I do... B. Anthony Ettinger wrote: Are you seeing the IE-specific 404 page? The one that looks like this: http://redvip.homelinux.net/varios/404-ie.jpg On 3/30/06, Bronislav Klucka [EMAIL PROTECTED] wrote: Hi, I'm using following construction to send http status code -- header('HTTP/1.1 404 Not Found'); header(Status: 404 Not Found); exit; -- MSIE displays Page not found, but FireFox and Opera don't display anything. Just blank page with no text... full headers sent by this script (and server itself) are: -- Date: Thu, 30 Mar 2006 18:02:49 GMT Server: Apache/2.0.55 (Debian) PHP/4.4.0-4 mod_ssl/2.0.55 OpenSSL/0.9.8a X-Powered-By: PHP/5.1.2 Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html 404 Not Found -- can anyone tell me, why those two browsers are not affected? Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- Jasper Bryant-Greene General Manager Album Limited http://www.album.co.nz/ 0800 4 ALBUM [EMAIL PROTECTED] 021 708 334 -- Anthony Ettinger Signature: http://chovy.dyndns.org/hcard.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php