CodeIgniter Forums
Not getting Errors... - 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: Not getting Errors... (/thread-41497.html)



Not getting Errors... - El Forum - 05-09-2011

[eluser]kb1ibh[/eluser]
Hello all, having some trouble i hope you can help with...

im working in a development environment and I'm constantly running into small syntax errors (missing ;'s, stuff like that) and whenever there is an error, rather than printing a message giving me a message, or even a line/filename, it doesn't display anything. just a blank page. its really slowing me down, and im looking to find a way to re-enable this error reporting, but havent found it yet, can someone point me in the right direction?
thanks


Not getting Errors... - El Forum - 05-09-2011

[eluser]Aaron Wagner[/eluser]
Check your PHP settings and make sure that the errors are set to output to the screen. I had the same issue. Look for this line in your php.ini file:

Code:
display_errors = On



Not getting Errors... - El Forum - 05-09-2011

[eluser]kb1ibh[/eluser]
Found the solution:

in index.php i commented out all the code related to error reporting (lines 20-50) and put this after it:

Code:
ini_set('display_errors', 'On');
error_reporting(E_ALL);
define('MP_DB_DEBUG', true);



Not getting Errors... - El Forum - 05-09-2011

[eluser]Aaron Wagner[/eluser]
That should do it. If you want to use the environment variables, then you could just add that code inside the switch statement. Otherwise, what you did should be great.