Error Question

[eluser]louis w[/eluser]
I noticed that not all PHP errors are getting returned to the browser (and logs).

If my php is broken, such as if i declare a class incorrectly with a missing training } it will not return it to the error log or on page error. Is there a way to see syntax errors as well? It would be very helpful if CI would return all the errors like native php error messages.

Some PHP errors, like parse errors, can not be cached by CI. Take a look at

Quote:The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called.

It should show you the error in the page load, if display errors is on, and acording to the error reporting level.

[eluser]louis w[/eluser]
My index file contains error_reporting(E_ALL); Should this display parse errors on page when CI can't? Do I need something else?

display_errors should be on
ini_set('display_errors', 'On');
That line should be in a successfully parsed file, if it's on a file with parse error it will die before executing it.

[eluser]louis w[/eluser]
Thanks Seppo, I see the errors now.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.