[CentOS] How to rotate PHP error log - since it belongs to apache

Alexander Farber

alexander.farber at gmail.com
Tue Jun 5 13:57:58 UTC 2012


Hello,

I'm using CentOS 6.2 with the stock rpm
php-5.3.3-3.el6_2.8.x86_64
and the following /etc/php.ini file:

  error_reporting = E_ALL & ~E_DEPRECATED
  display_errors = Off
  error_log = /var/log/php/php_errors.log

and that file is very useful for me because I have many custom
PHP-scripts at my site, but that file keeps growing too... :-)

So my question is for how to rotate it (esp. since it should
be owned by "apache" user) - what do you guys use?

Regards
Alex



More information about the CentOS mailing list