Codeigniter Displays a Blank Page Instead of Error Messages

Codeigniter displays a blank page instead of error messages

Since none of the solutions seem to be working for you so far, try this one:

ini_set('display_errors', 1);

http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors

This explicitly tells PHP to display the errors. Some environments can have this disabled by default.

This is what my environment settings look like in index.php:

/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*/
define('ENVIRONMENT', 'development');
/*
*---------------------------------------------------------------
* ERROR REPORTING
*---------------------------------------------------------------
*/
if (defined('ENVIRONMENT'))
{
switch (ENVIRONMENT)
{
case 'development':
// Report all errors
error_reporting(E_ALL);

// Display errors in output
ini_set('display_errors', 1);
break;

case 'testing':
case 'production':
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);

// Don't display errors (they can still be logged)
ini_set('display_errors', 0);
break;

default:
exit('The application environment is not set correctly.');
}
}

Codeigniter shows blank page with no error

@guys solved this issue, there is issue with Server PHP version. Now My website is running successfully. Thanks to all participants

Codeigniter displays a blank page in localhost

In case 'production': change ini_set('display_errors', 0); to ini_set('display_errors', 1); in index.php

when i hit index page instead of error messages I'm just getting a blank page.PHP

You have your answer in this post

Basically you have to add this 2 lines at the beginning of the file

error_reporting(-1);
ini_set('display_errors', 'On');

PHP Codeigniter Blank White screen after change system/core/common.php

Try this. But instead doing this you should change your ENVIRONMENT Constant as your requirement. If you want to show error change define('ENVIRONMENT', 'production'); to define('ENVIRONMENT', 'development');

switch (ENVIRONMENT)
{
case 'development':
error_reporting(-1);
ini_set('display_errors', 1);
break;

case 'testing':
case 'production':
error_reporting(-1);
ini_set('display_errors', 1);
break;

default:
exit('The application environment is not set correctly.');
}


Related Topics



Leave a reply



Submit