Rotate php_error.log and apache_error.log
Posted by: yosyos (---.185.3.147.253.ccc.net.il)
Date: October 29, 2017 09:22AM

Hey, My logs have become bigger and I would like to rotate(1 log per day in folder) the logs , especially the php_error.log and apache_error.log , i cant found it in wamp config

also, the logs that declared in the vhosts file.

how can I do that?

windows 7.
wamp64 bit

thanks

Options: ReplyQuote
Re: Rotate php_error.log and apache_error.log
Posted by: Otomatic (Moderator)
Date: October 29, 2017 05:59PM

Hi,

[httpd.apache.org]

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Rotate php_error.log and apache_error.log
Posted by: yosyos (---.orange.net.il)
Date: October 30, 2017 07:16AM

Hi thanks . Did not find an example for php_error.log . I guess it something in the php.ini?

Options: ReplyQuote
Re: Rotate php_error.log and apache_error.log
Posted by: Otomatic (Moderator)
Date: October 30, 2017 09:13AM

Hi,

Even without any real error, the apache_error.log file is filled by monitoring various Apache actions - start, stop, restart.
The same is true for the access.log file.
That's why Apache has a "rotate log" function.

On the other hand, with properly developed scripts, php_error.log should remain empty. There is no similar "rotate_log" for PHP that does not need it.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.1 32 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
Wampserver 3.1.1 64 bit - Apache 2.4.29 - PHP 7.1.11/7.0.25/5.6.32 - MySQL 5.7.20 - MariaDB 10.2.9
PhPMyAdmin 4.7.5 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.