I’m developing a PHP application using CodeIgniter as the framework, and PostgreSQL as the database. In \application\config\database.php I have the following configuration:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = '<myusername>';
$db['default']['password'] = '<mypassword>';
$db['default']['database'] = 'heatmap';
$db['default']['dbdriver'] = 'postgre';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
When I try to load my http://localhost/heatmap/ page I only get a blank page. Nothing is displayed, and the page source is empty as well. No error thrown. I’m only trying to load the default page that comes with CodeIgniter. I did googled this problem, and none of the related problems I found solved my problem. My Postgres version is 9.1, PHP is 5.3.8.
Are you sure that the problem is caused by your database(configuration)?
The default controller does not interact with the database and the database class is not loaded by default.
If you did load the database class yourself using
$this->load->database();then remove it and see if the default page is being displayed.I would also recommend turning
error_reporting()on so you can look through the logs and see what happens. More info on that topic can be found here.