CodeIgniter Forums
CI not displaying error messages - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CI not displaying error messages (/showthread.php?tid=9521)



CI not displaying error messages - El Forum - 06-27-2008

[eluser]Computerzworld[/eluser]
Hello, I am having the problem with one controller and CI doesn't gives error messages when any error occured. The page even goes blank when the same function is written twice by mistake rather than displaying can not re-declare the same function. Is there any way to display errors by means of setting something in configuration files or any other ways? please help me. Thank you.


CI not displaying error messages - El Forum - 06-27-2008

[eluser]Seppo[/eluser]
That's a PHP parse error - CI can not take control of this.
You can enable display_errors on your php.ini to get an error message when this kind of errors happens.


CI not displaying error messages - El Forum - 06-27-2008

[eluser]Computerzworld[/eluser]
ya but it displays the error messages when I use it with simple php structure and it doesn't displays any error messages in CI. I have even checked using phpinfo file and it shows display_errors as on.


CI not displaying error messages - El Forum - 06-27-2008

[eluser]parrots[/eluser]
Make sure error_reporting(E_ALL); is in index.php (first comment block is the error reporting level). Set it back to error_reporting(0); once your site goes live, but that should make the CI app show all errors while you're debugging things.


CI not displaying error messages - El Forum - 06-27-2008

[eluser]Computerzworld[/eluser]
I have enabled E_ALL in my index.php and it shows me the 2 warnings saying that can not modify header information. Headers already sent. Actually I want to restrict user when he/she is not logged in he should be redirected to login page. But as soon as I write redirect in my controller the page goes blank.