0

Magento2 not displaying errors while compile, I reinstall my unbutu and then install magento again but it is not displaying errors

Developer mode is on Paste this code in the index.php

error_reporting(E_ALL); ini_set('display_errors', 1);

but still no errors displayed

3
  • what yuo are seeing currently please let me know
    – Waqar Ali
    Commented Nov 29, 2022 at 12:27
  • It is better to check var/log/exception.log and system.log rather than manual error. Commented Nov 29, 2022 at 14:25
  • @WaqarAli while running the setup:di:compile, command it didn't display any fatal errors like having and extra comma in costructor but show this error on the live site i have gone through from every blog but could not find any proper solution that resolves my issue Commented Nov 30, 2022 at 4:48

2 Answers 2

0

Please check developer tab is available in advanced tab left side.If Developer tab is not available so your project is not completely in developer mode.

If you are using docker so you need to update root .env file on docker for the developer mode.

Like : MAGENTO_RUN_MODE=developer

0

There are a few possible reasons why errors are not being displayed in Magento 2 even though you have enabled error reporting:

The error reporting settings may be being overridden by another setting in your Magento configuration. To check this, go to the Magento Admin panel and navigate to Stores > Configuration > Advanced > Developer > Debug. Make sure the "Display Errors" setting is set to "Yes".

The PHP error_log file may be configured to log errors instead of displaying them. To check this, open the php.ini file and look for the error_log setting. Make sure it is set to a valid file path or set it to null to disable error logging.

There may be a problem with the PHP error handler. To check this, you can try adding the following line of code to your Magento index.php file:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

There may be a problem with your server configuration. If you are using Apache, make sure the mod_php module is enabled and that the .htaccess file is correctly configured to allow PHP errors to be displayed. If you are using Nginx, make sure the fastcgi_param PHP_VALUE "display_errors=1" directive is present in the server block configuration.

I hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.