CodeIgniter does not display errors

Sometime when there are errors you see only blank pages and error details are not displayed in the screen. This post is on how to fix the issue.

CodeIgniter disable PHP errors when the ENVIRONMENT has been set to production. So make sure you have set the ENVIRONMENT to development if you are still in development mode for debugging purposes.

Look for the following line in start of the index.php file.


define('ENVIRONMENT', 'development'); // if it is production then change to devlopment

Once you have done, if you still don't see the errors then you might need to call ini_set('display_errors', 1); a PHP method for displaying the errors if your PHP codnfiguration is defaulted not to show the error message in screen.

Generate your website

Do you know that the PHP Code Generator can generate PHP websites in minutes in CodeIgniter 3?

Learn more about our PHP Code Generator and generate your web applications using PCG with functioning admin portal.

Connect with Google or Facebook and generate your next CodeIgniter website in minutes with plenty of features like searching with pagination, AJAX based grid data editors, group based security and admin portal etc.