简体   繁体   中英

How to make Apache server to respect new php.ini values after restarting it?

I am trying to add error reporting to my php installation by adding the following line to the php.ini :

display_errors = On

Then I restart Apache server using the command:

sudo apachectl restart

Finally when I am running a phpinfo() function to see php installation details, I get the report that display_errors is Off .

Any ideas on what am I missing here?
Thank you.

That is strange. Are you certain the changes to /etc/php.ini are saved?

Are there any other script running before you get to your page? It could be that errors are being turned off in one of those scripts. Also, have you checked the php.ini file to make sure display_errors only appears once?

Doesn't make sense on the surface - if you change the correct php.ini file to display_errors = on and restart Apache, error reporting should be turned on. Can you paste your script?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM