Page 1 of 1

apache reload does not read php.ini changes

PostPosted: Wed Aug 08, 2012 8:03 am
by snocetti
Hello, I am trying to do some changes on php.ini (/etc/php5/apache2/php.ini) but those are not loaded by apache, I don't know why...

I changed settings like display_errors to Off ... and nothings happens

This is related info:

System Linux vicidial-db 2.6.34.10-0.4-default #1 SMP 2011-10-19 22:16:41 +0200 x86_64
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/conf.d


on php.ini

display_errors = Off

but phpinfo() shows:

default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off

Re: apache reload does not read php.ini changes

PostPosted: Wed Aug 08, 2012 8:14 am
by DomeDan
Did you restart apache after you made the change?
/etc/init.d/apache2 restart

Re: apache reload does not read php.ini changes

PostPosted: Wed Aug 08, 2012 8:16 am
by snocetti
Sure, I restart it... I reboot machine too.

Re: apache reload does not read php.ini changes

PostPosted: Wed Aug 08, 2012 8:26 am
by DomeDan
This was the case in my server too I just noticed.
and the reason is that "display_errors = Off" is overwritten by log_errors which is set to On by default

set this to:
log_errors = Off

and then phpinfo() displays:
display_errors Off Off
(at least in my case)