Setting a log file for Php errors

Setting a log file for Php errors..

Here is the tutorial about how to set up a log file for logging Php errors encountered during
the execution of the script


Steps to follow:
1)Go to /apache/bin

2)Open php.ini

3)Go to the line 309 or Find “log_errors” in “php.ini”

4)Simply replace “Off” with “On”

Now it would  be like log_errors="On"

So the errors would logged on to a file (It does n’t mean that errors would be displayed..For that you have to change the variable error_display)

5)Then Find “error_log” in php.ini

Make sure that the path is correct

E.g

error_log="C:\apache\logs\phperror.log"
6)Save Php.ini and restart the server

Now the errors would also logged on to separate phperror.log file..

This entry was posted on Thursday, February 19th, 2009 at 9:46 am and is filed under Apache Server, Php. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Post a Comment