Search code examples
phpadsapi-php.ini

Can't turn On PHP display_errors


I am working on Ubuntu 18.04 and for my projects I want PHP to display errors. As sudo, I did:

display_errors = On
error_reporting = E_ALL

Then restart Apache2 service but I still don't get any errors reporting.

I both modified php.ini in apache2 and cli folder and in the 2 versions of PHP (php7.0 and php7.2) on my system.

On phpinfo() I always get:

display_errors = Off

Solution

  • I did found a solution

    I added this line php_flag display_errors On to my .htaccess file. Errors are now displayed.