How to rotate php error logs
Posted on 2007-03-23
I am using Apache & PHP on Solaris.
The question is regarding PHP error logs.
In my php.ini file, the following flags are set as below.
log_error = On
log_errors_max_len = 1024.
If I set as above, am I going to get mutilple php_error.logs each of 1024 size or always I get only one php_error.log of 1024 size.
But for the above setting, my log size is grwoing beyond 1024 also.
My requirement here is that I should have similar functionality of "rotatelogs" of httpd for php_error.logs.
That is, once php_error log exceeds 1024, the new php_error log should be created and should also have the old php_error.log
Similar functionality of Piped logging using rotatelogs of httpd.