CodeIgniter Forums
Logging unhandled PHP exceptions - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: Installation & Setup (
+--- Thread: Logging unhandled PHP exceptions (/showthread.php?tid=82656)

Logging unhandled PHP exceptions - coolerkid9090 - 08-04-2022

How can I log all PHP uncaught exceptions to a file? I've looked at so many articles and nothing I've tried seems to work. I have my error_log variable set to a directory and display_errors=off in the php.ini and also in index.php, but none of these types of errors get logged to the file I specified. I created the file and gave it permission. Any idea what else I can try? 
I'm referring to the types of errors that would be displayed on screen when you run a script that has an error if display_errors were on, like:

An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected 'return' (T_RETURN)
Filename: /home/me/public_html/Test.php
Line Number: 43