I'm having a problem getting PHP3 and PHP4 to properly redirect to my Apache defined "ErrorDocument 404 ..." definition in my httpd.conf.
The error redirection works fine for 404 errored HTML, CGI, directory, etc but not for PHP scripts!?! Whenever I try to load a non-existant PHP document, I get the following error:
PHP4:
Fatal error: Unable to open c:\my documents\webserver\root\isontheweb\salsafresca\reviews.php in Unknown on line 0
PHP3:
Fatal error: Unable to open c:\my documents\webserver\root\isontheweb\salsafresca\tester.php3 in - on line 0
No input file specified.
It seems to me that this might be a misconfiguration in "php.ini", so I tried to turn off "display_errors", but then I just recieve a Internal Server Error!
The only thing that I can think of that may be causing this problem is the fact that I've got some "mod_rewrite" functions defined in my Apache .conf file. But my CGI script operate on the same code and 404 error redirect just fine. The lines in question are as follows:
RewriteCond %{REQUEST_URI} /php4-bin/
RewriteRule (.+) $1 [T=application/x-httpd-php,PT,L]
RewriteCond %{REQUEST_URI} /php3-bin/
RewriteRule (.+) $1 [T=application/x-httpd-php3,PT,L]
All of the PHP Error redirection information I can find seems to assume that Apache's ErrorDocument definition should take care of it, but in my case it's not, any ideas??
Thanks.
BTW... you can see what I mean on my site:
Existant PHP Page:
http://salsafresca.isontheweb.com/home.php
Non-Existant PHP Page:
http://salsafresca.isontheweb.com/nothere.php
Non-Existant HTML Page:
http://salsafresca.isontheweb.com/nothere.htm