Welcome Guest, Not a member yet? Register   Sign In
CI 1.6 with Postgres 8.2 database connection problem
#1

[eluser]fdog[/eluser]
Can't connect to postgres. All services are running and the data base and tables were created. The port is right. (triple checked).

database.php:
Code:
$active_group = "default";
$active_record = TRUE;

$db['default']['hostname'] = "localhost";
$db['default']['username'] = "user";
$db['default']['password'] = "password";
$db['default']['database'] = "mydb";
$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;

controller:
Code:
class Fooclass extends Controller {

function Fooclass()
{
    parent::Controller();
    $this->load->helper('html');
    $this->load->helper('url');
    $this->load->database(); //also tried in autoload.php (not at the same time)
}

function index()
{                
    $this->load->view('includes/top_view');
    $this->load->view('body_view');
    $this->load->view('includes/sidebar_view');
    $this->load->view('includes/footer_view');
}
}
The weirdest is that there is no error message, only a blank page. If I remove the $this->load->database() line, the thing works like a charm.


Messages In This Thread
CI 1.6 with Postgres 8.2 database connection problem - by El Forum - 02-10-2008, 08:48 PM
CI 1.6 with Postgres 8.2 database connection problem - by El Forum - 02-10-2008, 08:53 PM
CI 1.6 with Postgres 8.2 database connection problem - by El Forum - 02-10-2008, 09:11 PM
CI 1.6 with Postgres 8.2 database connection problem - by El Forum - 02-10-2008, 09:15 PM
CI 1.6 with Postgres 8.2 database connection problem - by El Forum - 02-10-2008, 09:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB