Take the 2-minute tour ×

I'm on OS X 10.9 (though, it was the same in 10.8)

I'm trying to get display_errors set to On but can't figure it out. I didn't have a php.ini file in /etc so I copied /etc/php.ini.default cp /etc/php.ini.default /etc/php.ini.

I then went into /etc/php.ini and uncommented the line display_errors and set it to On - display_errors=On. Saved the file and went to phpinfo().

For "Configuration File (php.ini)" Path it shows "/etc" and for "Loaded Configuration File" it shows "/etc/php.ini" so I assume that means it's using the correct php.ini file right?

But, when I scroll down in phpinfo() it shows "display_errors" as Off for both Local Value and Master Value.

What am I doing wrong? Is there another place I need to turn display_errors On? I'm using PHP 5.4.17

Edit: Forgot to mention that I've restarted apache several times with sudo apachectl restart and still no change.

Also, I found it weird that before I copied php.ini.default to /etc/php.ini, php was presumably using some default php.ini file but display_errors was still set to Off. Isn't that On by default?

share|improve this question
Have you restarted apache? –  Trenton Trama Oct 31 '13 at 17:17
Yes, sorry, I should have put that in there. I've restarted apache several times. –  Jack Hillard Oct 31 '13 at 17:19
Are you sure that you don't have two lines (one that says Off and one that says On?) –  h2ooooooo Oct 31 '13 at 17:21
In phpinfo, it should say where the configuration is being loaded from. Or, you can use the function php_ini_loaded_file to get the path. Is it pointing where you're expecting it to? –  Trenton Trama Oct 31 '13 at 17:21
Oh geez...I feel stupid. h2ooooooo was correct, one was set to off later down the page. I guess I uncommented where it was just explaining values and not where it was actually set. All good now, thanks! –  Jack Hillard Oct 31 '13 at 17:26
add comment

1 Answer

up vote 1 down vote accepted

h2ooooooo got it figured out. I uncommented the wrong section to set it to On. It was turing back off later down the page. All good now.

share|improve this answer
add comment

Your Answer


