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
Resize Animated Gif File Without Destroying Animation
Laravel Check If Related Model Exists
Copy Image from Remote Server Over Http
How to Get the HTML Code of a Web Page in PHP
What Is the Canonical Way to Determine Commandline Vs. Http Execution of a PHP Script
Send Json Data from JavaScript to PHP
Can You Get a Windows (Ad) Username in PHP
How Is the PHP Array Implemented on the C Level
Writing a New Line to File in PHP (Line Feed)
Imagecreatefrompng() Makes a Black Background Instead of Transparent
How to Re-Index All Subarray Elements of a Multidimensional Array
PHPmailer Godaddy Server Smtp Connection Refused
Get Everything Between ≪Tag≫ and ≪/Tag≫ With PHP