Jack Hillard
Jack Hillard

Reputation: 596

display_errors set to On but shows Off in phpinfo()

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?

Upvotes: 2

Views: 2447

Answers (1)

Jack Hillard
Jack Hillard

Reputation: 596

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.

Upvotes: 6

Related Questions