To turn on PHP error messages on cPanel, you can use the "PHP Selector" feature in the "Software" section. Here are the steps to follow:
- Log in to your cPanel account.
- In the Software section, click on the "PHP Selector" icon.
- In the "Option" section from the top.
- In the "Error Reporting" section, select "E_ALL" from the drop-down menu.
You can also achieve the same by editing the .htaccess
file, adding the following line of code
php_flag display_errors on
Please note that displaying PHP error messages can reveal sensitive information about your website and can be a security risk. It's recommended to turn off the error messages once you have finished debugging your website. Also, it's a good practice to keep track of the error logs in cPanel, it will help you to detect any issues with the website.