How to enable PHP error logging and review the errors?
Your website is not working? The error you saw is "Error 500" and you want to know why? In this article, we will show you how can you enable the PHP error logging and how to review PHP errors on our shared hosting service.
How to enable PHP error logging?
Log in to your cPanel account and click on the link called Select PHP Version. Then click on the button Switch to PHP Options.
Check the error_reporting line. If you want to enable PHP Error logging the value of this field should be E_ALL.
The changes are automatically saved, so you do not have to click anything. After you do this, the errors will be written in file called error_log and located in your project home directory(in the most cases it is the public_html folder).
NOTICE: Some PHP applications can override the value of this PHP variable.
How to review my PHP errors?
If we have enabled error reporting for our project, we can review the file error_log. This file contains all PHP errors recorded from the time when we have enabled error reporting in PHP.
We do not recommend to open this file in your browser if it's too large. We recommend to download it and to open it with editor who supports opening too large log files.