log rotate ispconfig error.log.1.gz
short description
/var/log/ispconfig/httpd/site/error.log.1.gz are never rotated.
environment
Server OS: debian/buntu
Server OS version: jessie/xenial
ISPConfig version: 3.1.12
Server version: Apache/2.4.10 (Debian)
Server built: Mar 31 2018 09:39:03
nginx version: nginx/1.10.3 (Ubuntu)
PHP 5.6.33-0+deb8u1 (cli) (built: Jan 5 2018 15:46:26)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with XCache v3.2.0, Copyright (c) 2005-2014, by mOo
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo
with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo
PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.30-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
proposed fix
while($num >= 1) {
if (is_file($error_logfile . '.' . $num . '.gz')) rename($error_logfile . '.' . $num . '.gz', $error_logfile . '.' . ($num + 1) . '.gz');
$num--;
}