log_errors_max_len = 1024 in php.ini, but php log keeps growing

Jeremy Blum picture Jeremy Blum · Dec 27, 2009 · Viewed 16.8k times · Source

As the title says, I've set the max length for the php error log, but it seems to keep growing much much larger than 1024. I am using the correct php.ini, I've restarted apache, etc. The permissions on the php log are 666.

Answer

user3850 picture user3850 · Dec 27, 2009

As is typical for PHP, it is not really obvious from the name of the configuration setting, or even the documentation, but this directive applies to the length of a single log message, not the length of the log file as a whole.

Use logrotate or a similar tool for what you are trying to do.