Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter not logging all PHP errors?
#1

[eluser]FireStarter[/eluser]
Does anyone have any idea why CI doesn't appear to log any PHP errors apart from Notice errors? My error reporting is set to E_ALL in index.php. For example I throw a random nonexisting function() into my code and this does not get logged. I understand that fatal errors cannot be logged via CI but what about the others? I can't seem to find any bugs anywhere to explain this.

Ideally, I would like to disable CI's overriding of handling PHP errors - I normally have PHP itself log all errors to a file. However, I don't want to hack the core. Is it possible to stop CI from overriding PHP error handling without hacking the core?

Thanks
#2

[eluser]john_j[/eluser]
read about error handling and that should answer all your questions.
http://ellislab.com/codeigniter/user-gui...rrors.html

I wouldn't recommend disabling CI's error handling.
#3

[eluser]Aken[/eluser]
Some errors can't (and thus, won't) be handled by the error handler. From http://us.php.net/manual/en/function.set...andler.php:

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.




Theme © iAndrew 2016 - Forum software by © MyBB