error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
My server is running EA4. Not using FPM. All sites are running PHP7.3
ini_set is disabled so scripts shouldn't be able to alter the error reporting setting.
I have set php 7.0 - 7.3 to use the following via the MultiPHP INI Editor
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
However in logs I am still seeing these reported.
These are Wordpress sites... I know there will be warnings and notices it's par for the course with wordpress and too many chefs. They will eventually be fixed by the respective authors.
I want to be aware of and have a log of actual errors... things I may need to take action on.
The logs keep growing out of control because it reports the same errors over and over including that ini_set is disable. Yes I know.... I disabled it in the first place.... Thank you...
I have also set these values to try to slow the error log growth...
ignore_repeated_errors = On
ignore_repeated_source = On
None of the settings appear to alter the reporting activity.
-
Wordpress core over-rides these values at run-time. I don't remember the detail, but it seems important for some functions. I ultimately created a script and run it via cron that looks for any error_log files beyond a certain size and certain age, and just deletes them. 0 -
Here's the script. I have this saved in a file, and cron set to run it once a day. #!/bin/bash find /home/*/ -name "error_log" -size +200k -mtime +5 -type f -not -path "/home/virtfs*" -exec rm {} \;
This deletes any error_log file found in a user home directory that is over 200kb and more than 5 days old, and it stays out off any virtual filesystems (from jailshells)0 -
Thanks for the feedback. But as I have previously mention. I don"t allow use of ini_set. There is no way WordPress can alter my settings. I am sure of this because I see in the error logs where WordPress is trying to alter it and I get the warning ini_set is not allowed on this server. it"s not just a matter of large log size but keeping the logs clear so I can see any actionable problems. If it"s a warning or notice over and over out of my control until a plugin is updated I can"t do much about that but if it"s truly an error not a warning or notice it may be something I can correct. But if all I ever see are a million warning and notices it doesn"t help much. what"s the point of being able to set the error reporting level if it"s not going to honor the settings? mom pretty certain something has changed or is overlooked as of ea4 or php7 maybe some further lower level setting that needs tweaking. I"ll keep your suggestion handy for log size control ;) thanks 0 -
Thanks for the feedback. But as I have previously mention. I don"t allow use of ini_set. There is no way WordPress can alter my settings. I am sure of this because I see in the error logs where WordPress is trying to alter it and I get the warning ini_set is not allowed on this server.
Hello @edoriv, Could you open a0
Please sign in to leave a comment.
Comments
4 comments