Need help disabling php error_log file
Hello
I am not able to disable the generation of the php error_log file within a client account. It is a server with only 1 account. The only way I can disable the generation of error_log files is by editing the php.ini within WHM.
I don't want to do this from WHM because I need the client to be able to do it from cPanel.
I tried to do it within the client account with the MultiPHP INI Editor, with .htaccess, with php.ini, with functions to disable error reporting within the php script that generates errors. Nothing works and the error_log file keeps being generated.
It is a pure cPanel server with no extras, and the PHP handler is lsapi.
Any ideas?
-
Hey hey! I would expect the local php.ini to handle this change normally. Could you create a PHP info page on the domain and see if the local values are being read properly? That's the first thing I'd check in this situation.
0 -
Hi!
Thanks a lot for the tip, I can't believe I forgot to add a phpinfo. Looking at the different variables I found one that does work.
This does nothing.
error_reporting = Off
This is the solution to disable the error_log, you just have to add it using the advanced editor in the MultiPHP INI editor.
log_errors = off
0 -
I'm glad that led you to the answer! error_reporting typically just suppresses the error from showing in the interface, while log_errors keeps the log from being generated at all.
0
Please sign in to leave a comment.
Comments
3 comments