Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

problem with php error log files

Discussion in 'EasyApache' started by dzamanakos, Feb 28, 2018.

  1. dzamanakos

    dzamanakos Active Member

    Feb 15, 2014
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    Hi, when using su_php i experienced a problem where php error log files didnt rotated after reaching 2MB (set in php.ini).

    I've recently moved to php-fpm for all accounts and php error files, now located in
    are getting very large (size of GB, due to warnings logging) and do not get rotated.

    Is there a way to keep them at max X mb ?

    Best regards,
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Generally, you'd want to address the error messages that are filling up the log files. However, as an alternative, you could reduce the default log level of PHP-FPM to include less information. There's a guide on how to configure custom values for PHP-FPM at:

    PHP-FPM configuration settings

    In this case, you'd want to adjust the "log_level" parameter from its default "notice" value to "warning" or "error". The other option would be to setup custom logrotate rules for the specific PHP-FPM error logs you want to rotate.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice