Welcome Guest, Not a member yet? Register   Sign In
CI not displaying error messages

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.

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.

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.

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.

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.

Theme © iAndrew 2016 - Forum software by © MyBB