I'm trying to enable PHP error output to the browser. phpinfo() shows that the path to php.ini is /etc/httpd/php.ini. So as root I edited it by adding a line:
display_errors = On
I restarted apache and it still didn't work, phpinfo() was showing that display_errors was Off both as local and master values. I rebooted my computer and the problem was still there.
If I add
ini_set("display_errors","1");
ERROR_REPORTING(E_ALL);
to my script it shows the errors, phpinfo() shows that display_errors as local value is On, but I'd like to find out why the php.ini solution isn't working. I don't know if it's relevant, but here's the permission settings to php.ini:
-rw-r--r-- 1 root root 48267 Oct 10 00:22 php.ini
Perhaps directive "display_errors" defined twice in php.ini:
As bindbn recommended, checking for duplicate directives in php.ini is a good start - then check the other places PHP configuration directives may be set.
You may want to follow Can't get PHP to stop showing errors and php 7 ignores ini files, but claims to load
sudo service php-fpm restart
before testing