Can someone confirm the following that was sent to me by my hosting provider. If have 
php script file that can not be found throwing 500 errors instead of 404 errors.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Because PHP-CGI is a little strange, you (as far as I know) apparently
can't set up any sort of custom 404 error for it.

PHP-CGI works like this: When Apache gets a request for a filename ending
in .pcgi, it sends that URL to a system-wide alias to a global PHP binary
(which itself is just a CGI script). When you send this global PHP binary
the URL of another script, that PHP binary takes the filename you sent it
and attempts to interpret it as a PHP script.

However, because the file you're sending the PHP binary doesn't exist,
there's nothing for PHP to do, and it just quits. Hence, you get a 500
error (because the systemwide PHP binary didn't spit anything out).

Because Apache immediately sends the file.pcgi to the systemwide PHP
binary, there's no way for it to check if the file exists.

If you can find a workaround we can implement, we'll gladly do it, but
I've looked and to the best of my knowledge, there's no way around this.

Sorry about this!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to