You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ken Willett <ke...@ocp.org> on 2003/06/30 23:28:18 UTC

[users@httpd] ErrorDocument file processed when it isn't supposed to be

On our site we have global ErrorDocument directives such as the following:

ErrorDocument 404 /html_error.php?err=404

The html_error.php page uses some common site code which has side effects,
such as storing the name of the current page into the session. I have
found that in some cases html_error.php is being run by Apache, even
though it isn't the page being requested, there is no 404 error occurring,
and the output of the PHP script is never sent to the browser.

I have worked around the problem by testing in html_error.php to see if
the "err=404" argument is being sent; in the case where html_error.php is
called erroneously, no arguments are sent at all (which is also odd).

Does anyone know under what circumstances the error document would be
processed, but not be sent to the browser?

-- Ken Willett


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org