Drupal 8 show php errors settings.php

Created at 30-Jan-2023 , By samar

In Drupal 8, you can show PHP errors by adding error_reporting(E_ALL); ini_set('display_errors', TRUE); to your settings.php file.

The path to the settings.php file is typically located at <Your_Project>/sites/default/settings.php.

ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

You can also use, $config['system.logging']['error_level'] = 'verbose'; to enable verbose logging in your configuration file, this will enable more detailed error reporting in your logs.

It's important to note that this is not recommended for production sites as it can reveal sensitive information and make your site vulnerable to attacks. It is recommended to use this in a development environment only.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.