ErrorDocument doesn't work for PHP scripts

From: Date: Fri, 20 Jun 2003 15:08:39 +0000
Subject: ErrorDocument doesn't work for PHP scripts
Groups: php.general 
Request: Send a blank email to php-general+get-152310@lists.php.net to get a copy of this message
I'm having a problem configuring my web server to redirect 404 errors to a custom error page. It almost looks like the PHP parser is getting hold of the request before apache has checked to see if the file exists. It works fine if you request an unknown page on the server that isn't a PHP script, but fails if it is. Examples: http://www.jeamland.org/blah.htm Displays the custom error page Logs: [Fri Jun 20 14:25:51 2003] [error] [client X.X.X.X] File does not exist: /spool/web/www.jeamland.org/html/blah.htm http://www.jeamland.org/blah.html (or blah.php) Displays a browser generated 404 error page Logs: [client 194.72.110.12] script not found or unable to stat Here's most of my virtualhost configuration, any thoughts appreciated! Thanks, Andy <VirtualHost *:80> ServerName www.jeamland.org DocumentRoot /spool/web/www.jeamland.org/html php_value include_path ".:/opt/php/lib/php" php_value auto_prepend_file none php_value auto_append_file none ErrorDocument 404 /_error.html <Directory /spool/web/www.jeamland.org/html> AddType application/x-httpd-php .html php_value include_path ".:/spool/web/www.jeamland.org/lib" php_value auto_prepend_file header.php php_value auto_append_file footer.php </Directory> </VirtualHost>

« previous php.general (#152310) next »