< All Topics
   

PHP error reporting is a valuable tool for identifying and troubleshooting issues in your website’s code. It displays error messages that help developers diagnose problems, but on a live website, you may prefer to disable these messages to prevent visitors from seeing them. Hosted.com® makes it easy to enable or disable PHP error reporting directly through cPanel.

What is PHP Error Reporting?

PHP error reporting is a feature that controls how PHP errors, warnings, and notices are displayed.

  • When enabled: Errors are shown in the browser, making it easier for developers to debug code.
  • When disabled: Errors are hidden from visitors, preventing exposure of sensitive details, but still logged for review.

How to Enable or Disable PHP Error Reporting in cPanel

1. Login to your Hosted.com® account.

2. Navigate to your web hosting plan from the Manage Services menu.

3. Click Manage next to the hosting plan associated with your domain.

How to Enable or Disable PHP Error Reporting in cPanel

4. Click Login next to Control Panel to open cPanel.

5. Scroll down to Software and click Select PHP Version.

How to Enable or Disable PHP Error Reporting in cPanel

How to Enable PHP Reporting Using MultiPHP INI Editor

1. Choose the domain you wish to manage.

2. Scroll down to display_errors.

3. Set to On to enable error reporting or Off to disable it.

4. Click Apply to save changes.

How to Enable PHP Reporting Using Select PHP Version

1. Click Options.

2. Locate display_errors in the list.

3. Toggle the setting On or Off as required.

4. Save your changes.

Additional Information

  • Development vs Live Sites: Enable error reporting on development sites for troubleshooting and disable it on live sites to maintain a professional appearance and protect sensitive data.
  • Error Logs: Even if error reporting is disabled, errors are still logged. You can view them via cPanel > Metrics > Errors or by checking your website’s error log files.
  • Security Considerations: Displaying errors on a live site may reveal server paths or code vulnerabilities to visitors.
  • Custom PHP Settings: Advanced users can also control error reporting by editing the php.ini or .htaccess files.
  • Propagation: Changes to PHP settings take effect immediately and do not require DNS propagation.
Was this article helpful?
Please Share Your Feedback
How Can We Improve This Article?