Welcome Guest, Not a member yet? Register   Sign In
help .. i cant connect to my databse
#1

[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 ...
#2

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

[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....
#4

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

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




Theme © iAndrew 2016 - Forum software by © MyBB