1

When I tail my /var/log/apache2/error_log file, it is truncating some data I am trying to display.

Example:

error_log(serialize($data));

As I understand it, the PHP INI Setting "log_errors_max_len" determines how long this is. And by default is is 1024. Mine is truncating at 8109 characters.

I have changed the value by using:

  • ini_set('log_errors_max_len', 0);
  • /etc/php5/apache2/php.ini (log_errors_max_len = 0)
  • /etc/php5/cli/php.ini (log_errors_max_len = 0)

Note: I am restarting Apache after each change to the php.ini file.

Unfortunately, none of these setting changes seem to change the amount of data that is displayed before truncating.

Anyone have a suggestion?

Thanks!

Daryl
  • 772
  • 8
  • 21
  • I did some additional research because I was confused as well. What I came across is that the `log_errors_max_len` refers to the length of the file (or string) and not the filesize. (in bytes) Here's a bug written on the PHP site with resoultion for reference: [PHP Bug](https://bugs.php.net/bug.php?id=41035) – lovermanthing Mar 25 '16 at 23:00

0 Answers0