Devin Dixon
Devin Dixon

Reputation: 12383

Output Buffering Not Displaying Error Notice

In my PHP script I had errors turned onto E_ALL. Then around my views I add an output buffer that starts and ends with ob_start()/ob_flush. The problem I am having now is Notices will not be displayed if they occur but Fatal errors will.

Does anyone have an idea why this is happening and how it can be changed?

If it matters, I am running PHP 5.3.3 on a Centos 6 server with Apache.

Upvotes: 3

Views: 1093

Answers (1)

Theodore R. Smith
Theodore R. Smith

Reputation: 23231

Edit your php.ini:

  1. Be sure you have the proper error_level set (see: http://www.php.net/manual/en/function.error-reporting.php).
  2. Make sure display_errors is set to On in dev/test environments and Off on production environment.
  3. Set log_errors=/tmp/phperrors.log.

Then you should be covered.

Upvotes: 1

Related Questions