CodeIgniter Forums
Maddening Lack of Error Reporting - White Screen - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Maddening Lack of Error Reporting - White Screen (/thread-12600.html)



Maddening Lack of Error Reporting - White Screen - El Forum - 10-24-2008

[eluser]ladyj001[/eluser]
I'm sure this is a rookie setup/config mistake...But, I am having a devil of a time getting CI to display coding errors that occur in the controller and/or view. Instead of error messages, I get a blank screen.


For example, in the controller I called an model method that did not exist. Rather than an error, I got the blank screen.

Another time, I invoked a view that was using form helper functions; but, I forgot to load the helper. Again, no error message on screen or in log. Just a blank screen.

So it is completely maddening not to have to debug by trial an error - literally commenting out one line at a time until I find the culprit.

I have $config['log_threshold'] = 4 - but in the cases above, no errors were written to the log. I have $this->output->enable_profiler(TRUE) is my controller, but no errors show up on the screen.

Any help would be greatly appreciated.


Maddening Lack of Error Reporting - White Screen - El Forum - 10-24-2008

[eluser]Huan[/eluser]
Have you tried to edit index.php:

error_reporting(E_ALL);

if it was "0" instead of "E_ALL" the screen will go blank


Maddening Lack of Error Reporting - White Screen - El Forum - 10-25-2008

[eluser]ladyj001[/eluser]
Thanks for the response. Yes it is already set to E_ALL. But still not all errors are displayed on the screen.

A workaround is that apache logs all PHP errors; so, I am able to diagnosis problems by checking the apache log files. But, it would be nice if all errors were displayed consistently on the screen.


Maddening Lack of Error Reporting - White Screen - El Forum - 10-25-2008

[eluser]Pascal Kriete[/eluser]
Turn display_errors on in your php.ini to get all errors system-wide, including syntax errors. Or you can do it on a 'per application' basis by putting the following into your index.php file:
Code:
ini_set('display_errors', 1);

Welcome to CodeIgniter.


Maddening Lack of Error Reporting - White Screen - El Forum - 10-25-2008

[eluser]ladyj001[/eluser]
Thanks. But display_errors is already on in my php.ini file.


Maddening Lack of Error Reporting - White Screen - El Forum - 12-01-2008

[eluser]jjpmann[/eluser]
not sure if you have found the answer but did you check to see if your 'logs' directory is writable


Maddening Lack of Error Reporting - White Screen - El Forum - 12-01-2008

[eluser]Michael Wales[/eluser]
Code:
error_report(E_ALL|E_STRICT);

Usually a white-screen means there is white-space where they shouldn't be. Make sure you aren't using PHP's closing tag.


Maddening Lack of Error Reporting - White Screen - El Forum - 12-27-2010

[eluser]johnwbaxter[/eluser]
[quote author="Michael Wales" date="1228187637"]
Code:
error_report(E_ALL|E_STRICT);

Usually a white-screen means there is white-space where they shouldn't be. Make sure you aren't using PHP's closing tag.[/quote]

I know this is an old thread but it needs pointing out, that code should be:

Code:
error_reporting(E_ALL|E_STRICT);
not
Code:
error_report(E_ALL|E_STRICT);