PDA

View Full Version : php error log for each website


gring
8th September 2009, 21:16
Hi!

Is it possible to have php to log its errors to a different file for each website, like it is the case for the apache logs?

in php.ini it is explained how to log to a file, but it's the same file for every website.

thanks

Leszek
9th September 2009, 01:48
One way to do it is to use suphp and have individual php.ini files configured for each virtual host to have it's own log file.

gring
9th September 2009, 13:57
Hi Leszek

Thanks for your answer.
It seems that the solution was simple, just activate logging in php.ini without specifying a log file, and the errors will be logged in apache's logs, which are already separated for each site