1

According to the manual log_errors_max_len

Set the maximum length of log_errors in bytes. In error_log information about the source is added. The default is 1024 and 0 allows to not apply any maximum length at all. This length is applied to logged errors, displayed errors and also to $php_errormsg.

When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.

However even when i set this setting, php still allows this file to reach unlimited file sizes. In my php.ini file the file size is still limited to 1024 as said in the manual. What could be wrong with it or possible overriding it?

Community
  • 1
  • 1
bicycle
  • 8,315
  • 9
  • 52
  • 72
  • for example: how much the size of that file that exceeded? –  Feb 17 '13 at 19:44
  • what exactly you set for log_errors_max_len? can you copy and paste here? –  Feb 17 '13 at 19:55
  • just what it says in the title. Or actually `$error_file_size_limit = 20000; ini_set("log_errors_max_len", $error_file_size_limit);` but that's the same – bicycle Feb 17 '13 at 19:57
  • 1
    wow: "This length is applied to logged errors, displayed errors and also to $php_errormsg..." –  Feb 17 '13 at 20:00
  • possible duplicate of [log\_errors\_max\_len = 1024 in php.ini, but php log keeps growing](http://stackoverflow.com/questions/1966540/log-errors-max-len-1024-in-php-ini-but-php-log-keeps-growing) – hakre Sep 01 '13 at 08:33

1 Answers1

3

log_errors_max_len sets maximum length of a single error message, it has nothing to do with log file size. You need to set log rotation if you don't want it to grow too much

Marko D
  • 7,576
  • 2
  • 26
  • 38