Overview
This article explains how to temporarily enable PHP warnings so they display in the panel or on a website.
Background
PHP warnings and deprecated notices are hidden by default, so error logs only show critical errors. However, you can temporarily enable these hidden warnings to allow further troubleshooting of a website.
Understanding the messages displayed
The following table provides information on error messages that appear after you enable PHP warnings.
DreamHost recommends upgrading to PHP 7.4+ to benefit from better error handling and visibility.
| PHP version | Default errors displayed | Messages displayed after enabling PHP warnings |
|---|---|---|
| 7.4+ | PHP Fatal Errors |
|
| 7.3 or lower | None |
|
Enabling PHP warnings
There are two ways to view PHP warnings.
- In the panel (read from your website's error.log file)
- Displayed on your website
Option 1 — Enable in the panel
This option temporarily enables PHP warnings in a website's error.log file. These errors can then be viewed in the panel.
- Navigate to the Manage Websites page.
- Click the Manage button to open Website settings, which allows you to modify various configurations for your site.
- Click the Settings tab.
- On the Web Options row, click the Modify button.
- Click the toggle to the right of Temporarily Enable PHP Warnings to enable.
PHP warnings are visible for a period of 7 days and are then disabled automatically.
Option 2 — Enable on your website
This option displays the warnings on your site instead of in the panel. Add the following line to your phprc file using an FTP client or SSH:
display_errors = on
If any PHP errors are thrown, they will now display on your site.
Live websites
This is not recommended on a live website since visitors will see the errors.