I am using linux with postgres
This is my connection.php file.
So when ever i need connection i include this file at the top of that particular page.
PHP Code:

<?php
require_once '/zeus/tsweb/pg.php';
require_once 
'/zeus/tsweb/defaults.php';
require_once 
'session.php';

$pg_hostname_Zeus "localhost";
$pg_database_Zeus "b001db";
$pg_username_Zeus "ts_admin";
$pg_password_Zeus $pgPassword;
global 
$Zeus;

//$pgZeus = @pg_close();
$pgZeus = @pg_connect("host=$pg_hostname_Zeus dbname=$pg_database_Zeus user=$pg_username_Zeus password=$pgPassword");
//or trigger_error(pg_error(),E_USER_ERROR);

$pageTopeBgcolor="#ECE9D8";

?>
the error says sth do with pg_session.php

code in that file is this
PHP Code:

<?php
function open($save_path$session_name) {
    global 
$sess_save_path;

    
$sess_save_path $save_path;
    return(
true);
}

function 
close() {
    return(
true);
}

function 
read($id) {
    global 
$sess_save_path;

    
$sess_file "$sess_save_path/sess_$id";
    return (string) @
file_get_contents($sess_file);
}

function 
write($id$sess_data) {
    global 
$sess_save_path;

    
$sess_file "$sess_save_path/sess_$id";
    if (
$fp = @fopen($sess_file"w")) {
        
$return fwrite($fp$sess_data);
        
fclose($fp);
        return 
$return;
    }
    else {
        return(
false);
    }
}

function 
destroy($id) {
    global 
$sess_save_path;

    
$sess_file "$sess_save_path/sess_$id";
    return(@
unlink($sess_file));
}

function 
gc($maxlifetime) {
    global 
$sess_save_path;

    foreach (
glob("$sess_save_path/sess_*") as $filename) {
        if (
filemtime($filename) + $maxlifetime time()) {
            @
unlink($filename);
        }
    }
    return 
true;
}

if(
get_cfg_var("session.save_handler") == 'user') {
    
session_set_save_handler("open""close""read""write""destroy""gc");
}

if(
get_cfg_var("session.auto_start") == 0) {
session_start();

require_once 
'/zeus/tsweb/pg.php';
//require_once '/zeus/tsweb/defaults.php';

$pg_hostname_Zeus "localhost"//it was 127.0.0.1
$pg_database_Zeus "zeusV6";
$pg_username_Zeus "ts_admin";
$pg_password_Zeus $pgPassword;
global 
$pgZeus;

$pgZeus = @pg_connect("host=$pg_hostname_Zeus dbname=$pg_database_Zeus user=$pg_username_Zeus password=$pgPassword");
//or die('Could not connect: ' . pg_last_error());

$_SESSION['MAX_ROWS'] = 15;    // default lines per page
$pageTopeBgcolor="white";

}
?>
I am quite new to all these stuff....so im kinda lost.....