php: hiding full paths in error messages
Posted by: alexalex
Posted on: 2006-05-03 18:57:00
Hi, I'm trying to get this set of directives working in an .htaccess file, so that any time my PHP has an error, the full path to the file is NOT shown to the user's browser:
php_flag display_errors off
Ideally I'd get these two directives working as well, but that's secondary to the display_errors directive:
php_flag log_errors on
php_flag error_log "myerrors.log"
I've put these 3 lines in an .htaccess file, chmod'd so the server can use it, and have a script that intentionally triggers a fatal error, plus a few warning just for fun. This script still shows errors with the full paths though. I've also made a wrapper around phpinfo() PHP function, and looked at the "local" setting for "display_errors" which I would expect to be set to "off", but it's still "on".
Any ideas? Is there some setting I need to have enabled in my hosting plan so that these php_flag directives have an effect? Is there some other directive magic that I need to have in my .htaccess file? Do I need an .htaccess at the root of my web server (this one I'm trying to get working is a couple directories down from the root of my domain) that has something to enable .htaccess futher down in the directory tree? I couldn't find anything related to this in the wiki or these forums.
Thanks!