Friday, 29 July 2011

How to enable error log in php?

Hi Folks,

Go to vim etc/php5/apache2/php.ini where you will find log_errors = Off

change Off to On. save file and exit.

Now restart apache server with the following line:

sudo etc/init.d/apache2 restart


To see what is coming into log, do the following task:

create php file and wirte some code with errors.

and run the following command:
tail -f var/log/apache2/error.log


1 comment: