How do I view PHP error logs?


#1

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.


#2

Check: /home/username/logs/example.com/http/error.log


#3

chizeng.

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


#4

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


#5

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.


#6

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: http://blog.inspired.no/javascript-error-logging-with-ajax-154/