How can I turn off display_errors using .htaccess

Status
Not open for further replies.

leozusa

New Member
Messages
3
Reaction score
0
Points
0
Hi, I asked before with no responses, I want to disable the display_error feature account-wide, as I always check the error_log instead

As can be seen in the official php doc (http://www.php.net/manual/en/errorfu...display-errors) note 1:

"This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet)."

I am aware that this wont be changed system-wide and because of the same doc, note 2:

"Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. "

So the only solution available is to add
php_value display_errors 0
to the .htaccess file, but doing so is giving me a 500 error

I'm enclosing it between a <ifModule mod_php5.c> tag with no effect, I just guess it's because the module has a custom name on the server, or something else I just can't figure out...

I have hours trying variations on this file, also already searched the KB and this forums with no success. Please give me some advise.

Thanks in advance!
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
We have PHP installed as a CGI binary across all of our servers. Any mod_php* specific Apache directives will not work.
 

leozusa

New Member
Messages
3
Reaction score
0
Points
0
Then how can I accompish this?? is there another way for me to turn off the display_errors directive? Please help me with this because I use XMLHttpRequest responses and they get dirty with php error messages when sometimes they are just notices... and there are times when ini_set doesn't stop them from appearing... So what could I do? BTW, thank you for your prompt response!
Edit:
maybe you can set up an environment variable inside my account??? Just a guess but maybe php accepts something like that...
 
Last edited:
Status
Not open for further replies.
Top