Skip to main content

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

Comments

4 comments

  • verdon
    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
  • verdon
    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
  • edoriv
    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
  • cPanelMichael
    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 a
    0

Please sign in to leave a comment.