What You Don't Know About PHP Error Reporting - Coding Cyber

What You Don’t Know About PHP Error Reporting

You can change the display errors configuration from PHP.ini file on your server. In some cases, you won’t be able to access the PHP.ini file.

So you can use this trick to enabling & disabling display errors and error reporting in your PHP files.

To display errors set this to 1, If you want to disable the errors set this to 0.

To display startup errors set this to 1, If you want to disable the startup errors set this to 0.

With this statement, you can change the error reporting levels. If you want to disable error reporting set this to 0.

If you see an error with “Internal Server Error”, that may be because of a PHP error. And you won’t be able to see the error.

To know these PHP programming errors, you should enable error reporting. If you don’t have access to php.ini file on your server like if you are on shared hosting, most shared hosting software like cPanel gives a way to enable/disable error reporting based on the accounts.

If you don’t know how to do that you can enable or disable with your project PHP files with the above code.

Related Posts
No related posts for this content
Vivek Vengala
 

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: