Hi
I have used mysql in the past, and I though I might have a look at postgresql (7.4.8). Well, I installed that and I can conenct through the command line, it shows up on a portscan (port 5432) so it appears to be working. I created a new user (tom) and went to look at getting it to work with php4 on apache2.
I installed php4-pgsql, and made a simple test file. It didn't work (I can't remember the error). So I tried to connect using pear:
B and I got this message:
DB Error: connect failed
This is the php script:
PHP Code:
<?php
require_once('DB.php');
$dsn = array(
'phptype' => 'pgsql',
'hostspec' => 'localhost',
'database' => 'tom',
'username' => 'tom',
'password' => ''
);
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
?>
Is there something I'm doing wrong here? I know the database 'tom' exists, I know the use 'tom' exists, and I modified the 'phptype' to mysql and it worked.
Thanks in advance,
Tom.