Where can I view PHP errors and warnings?


When PHP changes are made on your site (usually from upgrading the PHP version), you may find that PHP throws errors and warnings. In the past, these would display on your website and you could turn them off using a phprc file.

DreamHost now disables all PHP warnings by default. This means you should never see them on your website when making changes to PHP.

Where can I view PHP errors and warnings?

Since these warnings have been turned off globally, you won't see them on your site. But you can still see all PHP errors and warnings in your error.log file.

How can I display the warnings on my site?

To display the warnings on your site, you just need to add the following line to your phprc file:

display_errors = on

If any PHP errors are thrown, they will now display on your site.

Setting error reporting in your script

As mentioned above, the phprc file controls which errors are displayed. As such, the following lines will not function in your PHP script to display errors:


The only way to display errors is to edit your phprc file.

See also

Did this article answer your questions?

Article last updated PST.