![]() |
How can I display normal php errors? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How can I display normal php errors? (/showthread.php?tid=24539) |
How can I display normal php errors? - El Forum - 11-12-2009 [eluser]0plus1[/eluser] I'm seldomly getting this error: Quote:A Database Error Occurred The database works and using the "normal" php functions works too.. I would love to know what php is telling code igniter. How can I do this? How can I display normal php errors? - El Forum - 11-12-2009 [eluser]Zeeshan Rasool[/eluser] You may enable error reporting from index.php on root by setting: error_reporting(E_ALL); How can I display normal php errors? - El Forum - 11-12-2009 [eluser]0plus1[/eluser] [quote author="zEsHaN" date="1258056557"]You may enable error reporting from index.php on root by setting: error_reporting(E_ALL);[/quote] This continues to show the: Code: A Database Error Occurred instead of the "real" php error How can I display normal php errors? - El Forum - 11-12-2009 [eluser]AgentPhoenix[/eluser] What you're seeing isn't a PHP error, it's an error being returned from your database. You can tell because the top of it says a database error occurred. CI has a completely separate error view for errors returned from the database. If it's a PHP error, the message would say "A PHP Error was encountered." How can I display normal php errors? - El Forum - 11-12-2009 [eluser]Vi.[/eluser] Just open your apache log file and go to last line. You can also use CI log file to save PHP errors into log file. Open application/config.php and change $config['log_threshold'] to '4'. All errors will save into system/logs/ folder. CI has custom error page for some part. Database, mysql query, unaccessible uri etc. How can I display normal php errors? - El Forum - 06-20-2012 [eluser]Unknown[/eluser] Hi from Argentina. To show all php errors, i just update de index.php like this: if (defined('ENVIRONMENT')) { switch (ENVIRONMENT) { case 'development': error_reporting(E_ALL); ini_set('display_errors','On'); // <----- added break; case 'testing': case 'production': error_reporting(0); ini_set('display_errors','Off'); // <----- added break; default: exit('The application environment is not set correctly.'); } } |