CodeIgniter Forums
help .. i cant connect to my databse - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: help .. i cant connect to my databse (/showthread.php?tid=7721)



help .. i cant connect to my databse - El Forum - 04-20-2008

[eluser]Unknown[/eluser]
help! im new pretty new in using codeIgniter.. iv followed the instruction and installed the whole thing. unfortunately, i can’t connect to the database .. im using postgre .. this is how my database.php looks like:

$active_group = “default”;

$db[’default’][’hostname’] = “192.168.1.254”;
$db[’default’][’username’] = “elisha”;
$db[’default’][’password’] = “elisha1104”;
$db[’default’][’database’] = “test”;
$db[’default’][’dbdriver’] = “postgre”;
$db[’default’][’dbprefix’] = “”;
$db[’default’][’active_r’] = TRUE;
$db[’default’][’pconnect’] = TRUE;
$db[’default’][’db_debug’] = TRUE;
$db[’default’][’cache_on’] = FALSE;
$db[’default’][’cachedir’] = “”;

?>

and autoload.php already contain this line:

$autoload[’core’] = array(’database’);

im really new at this.. in fact i have just recently learned how to program.. but i had to do this project for our major so i have to learn quick ...


help .. i cant connect to my databse - El Forum - 04-20-2008

[eluser]wiredesignz[/eluser]
Code:
/*
| -------------------------------------------------------------------
|  Auto-load Core Libraries
| -------------------------------------------------------------------
|
| DEPRECATED:  Use $autoload['libraries'] above instead.
|
*/



help .. i cant connect to my databse - El Forum - 05-30-2008

[eluser]Yusni El-Joy[/eluser]
i have same problem, my database configuration in database.php looks like :

$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "127.0.0.1";
$db['default']['username'] = "postgres";
$db['default']['password'] = "password";
$db['default']['database'] = "test";
$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']['port'] = 5432;
=======================================================

my autoload.php looks like :

$autoload['libraries'] = array('database');
=======================================================

but it just produces white blank page in my website, and it is not happen when i use mysql connection.

Thanks for your solution....


help .. i cant connect to my databse - El Forum - 05-31-2008

[eluser]Jamie Rumbelow[/eluser]
Check if the Character Sets are right, and try turning db_debug off.


help .. i cant connect to my databse - El Forum - 06-02-2008

[eluser]Yusni El-Joy[/eluser]
ok, it works... Thanks...