How do I view PHP error logs?


How do I view PHP error logs? I am developing a web app with jQuery Mobile, and I can’t as easily view errors in the browser.

Is there a file akin to var/logs/apache2/php.log that I can view to get the errors from PHP?

I tried phpinfo(), but there was no PHP error log file listed.


Check: /home/username/logs/



Andrewf sent you to the apache system error log, there is no separate php error log


Just out of curiosity, why are you looking for PHP error logs when you are developing with jQuery? Or is the jQuery part unrelated?


I am writing a web app with jQuery Mobile that involves server side interaction with PHP.

Unfortunately, jQuery Mobile uses Ajax to load web pages, so PHP errors can easily be suppressed in production code. It would really nice to clearly see the errors in a log file on my server.


I see. Consider adding a controller to log JS errors. It’s quite simple to catch all JS errors and send them to a custom controller for logging. I use something like this: