views:

217

answers:

2

Hello everybody

I have a PHP server at home for development. It is running:

Ubuntu 9.10
Apache 2.2.12
PHP 5.3.2-0.dotdeb.1
MySql 5.0.7-dev

Currently the settings in the php.ini for displayiong errors are:

display_errors = on
error_reporting = E_ALL

But I do not see any errors in my php script. Also very strange is that phpinfo() shows me this:

display_errors Off

I checked the php.ini file, and restarted the apache server many times, but with no luck. Does anybody knows how this is possible?

edit:
When I localy set this:

ini_set('display_errors', 'on');

I do receive errors.

+2  A: 

Ubuntu keeps separate copies of the php.ini file for each type of PHP installation.

I'm not familiar with the dotdeb release, but I'd guess it'd be in /etc/php5/apache2/php.ini

Edit: Since this is apparently not the case, try restarting Apache. PHP won't pick up changed settings until you do.

R. Bemrose
I also checked that. My phpinfo() shows me "Loaded Configuration File: /etc/php5/apache2/php.ini" That is the php.ini I work in!
iSenne
Have you restarted Apache since you updated the configuration?
R. Bemrose
Yes. I stopped the server and then restarted it again.
iSenne
Is the `display_errors` parameter listed more than once in that file?
thetaiko
errors might also be turned off in an .htaccess file
thetaiko
I think it is safe to say that you are my hero :). Really weird, but at the bottom of the file, display_errors was set to off. Tnx very much. You saved me a lot of time
iSenne
@thetaiko: You should add that as an answer, so iSenne can give you credit for it.
R. Bemrose
@OMG Unicorns - good call!
thetaiko
+2  A: 

Is the display_errors parameter listed more than once in your php.ini file? If its defined more than once, the second instance of it will override the first.

thetaiko
Tnx again for the clear thinking :)
iSenne
+1: I've run into this before and yet didn't think of it. Whoops.
R. Bemrose