Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
up vote 3 down vote accepted

Perhaps directive "display_errors" defined twice in php.ini:

grep -i display_errors /etc/httpd/php.ini
share|improve this answer
    
that was is, thanks! – David McDavidson Oct 10 '10 at 15:48

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.

share|improve this answer

You may want to follow Can't get PHP to stop showing errors and php 7 ignores ini files, but claims to load

  1. What is "Loaded Configuration File" -> check that you edit the correct ini-file
  2. check for multiple occurences of display_errors in the same file.
  3. Check permissions on the ini file. The web server needs read access.
  4. php 5 and later: try sudo service php-fpm restart before testing
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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