RE: [PHP] sending a 404 error
... and how do you get the server to send a 404 error if the browser calls a page that doesn't exist with a suffix that is marked to be parsed by php? Tim Ward -- From: GATop [SMTP:[EMAIL PROTECTED]] Sent: 17 September 2001 05:44 To: [EMAIL PROTECTED] Subject: Re: [PHP] sending a 404 error Hello Michael, Sunday, September 16, 2001, 9:05:35 AM, you wrote: MAP Is it possible to invoke the server 404 error error from php? MAP Where I would like to do such a thing is MAP http://24.5.29.77:10080/encryption/index.phps MAP I would like to replace the line MAP die (The file you wish to download does not exist); MAP with instead an invocation of the http 404 error. MAP Theoretically a 404 error should never happen if I properly did my stuff, but it would be nice for me to be able to detect such problems just from the http error logs... MAP If there's not a way to directly do it, I'll need to redirect to a 404 error page (well, include my custom error page) and have the script make an entry into the http_error log- but a nice one MAP liner invocation of Apache's built in 404 error function would be nice... Yes You can header (404 Not Found); should work -- Best regards, GATopmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] sending a 404 error
Is it possible to invoke the server 404 error error from php? Where I would like to do such a thing is http://24.5.29.77:10080/encryption/index.phps I would like to replace the line die (The file you wish to download does not exist); with instead an invocation of the http 404 error. Theoretically a 404 error should never happen if I properly did my stuff, but it would be nice for me to be able to detect such problems just from the http error logs... If there's not a way to directly do it, I'll need to redirect to a 404 error page (well, include my custom error page) and have the script make an entry into the http_error log- but a nice one liner invocation of Apache's built in 404 error function would be nice... -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters http://24.5.29.77:10080/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending a 404 error
Hello Michael, Sunday, September 16, 2001, 9:05:35 AM, you wrote: MAP Is it possible to invoke the server 404 error error from php? MAP Where I would like to do such a thing is MAP http://24.5.29.77:10080/encryption/index.phps MAP I would like to replace the line MAP die (The file you wish to download does not exist); MAP with instead an invocation of the http 404 error. MAP Theoretically a 404 error should never happen if I properly did my stuff, but it would be nice for me to be able to detect such problems just from the http error logs... MAP If there's not a way to directly do it, I'll need to redirect to a 404 error page (well, include my custom error page) and have the script make an entry into the http_error log- but a nice one MAP liner invocation of Apache's built in 404 error function would be nice... Yes You can header (404 Not Found); should work -- Best regards, GATopmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] sending a 404 error
Close- this is what actually worked- header (HTTP/1.1 404 Not Found); But thanks- it got me on the right track, anyway (i wasn't aware server responses were sent from the header) It doesn't log it in the error_log or send the 404 error page, but i have a custom error page- so i just include() it... works beautifully, and agents like wget understand there's nothing to grab. On Sun, 16 Sep 2001 20:44:02 -0800 GATop [EMAIL PROTECTED] wrote: *snip* MAP I would like to replace the line MAP die (The file you wish to download does not exist); MAP with instead an invocation of the http 404 error. *snip Yes You can header (404 Not Found); should work -- Best regards, GATopmailto:[EMAIL PROTECTED] -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters http://24.5.29.77:10080/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]