Welcome Guest, Not a member yet? Register   Sign In
CI Error Reporting
#1

I have a project running 3.1.11 with PHP 7.4 and i'm hoping someone could help shine some light on a situation i'm running into. I'm not sure if it's a difference in going from CI 2 to 3 or from PHP 5.6 to 7.4. The issue is this, I no longer get emails sent to me from crontab with PHP errors. This particular project was relying on said email notifications to know if we hit an uncaught exception (I realize there are way better ways to handle this and the project is way to big right now to change it in any decent amount of time). Example, if we hit a variable that wasn't defined, i'd get an email from the cron daemon containing the PHP error message and the script (controller) would stop immediately upon the first error it encountered even with the index.php set to Production.

I know longer have any of that behavior and I thought I understood the changes when I upgraded everything. However, I did play around with overriding the php settings in each script (controller) that is being called in the crontab which will allow the php errors to be emailed but the script will still continue to run. I'm simply putting error_reporting(-1); and ini_set('display_errors', 1); in the beginning of each script that is set to run via crontab.  

Thanks in advance for any assistance in figuring this out.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB