Connection problem

From: Laukó Péter <plauko(at)freemail(dot)hu>
To: pgsql-php(at)postgresql(dot)org
Subject: Connection problem
Date: 2001-11-24 22:36:12
Message-ID: freemail.20011024233612.47743@fm3.freemail.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi,
I try to connect to a PostgreSQL database from my php script, and get the following error:

Warning: Unable to connect to PostgreSQL server: FATAL 1: Database "www-data" does not exist in the system
catalog. in /home/lao/proj/hajnalcsillag/www/classes/DBConnection.php on line 10

The code is:
<?

class DBConnection
{
var $con_string;

function DBConnection()
{
$con_string = "dbname=hajnalcsillag user=lao password=abc123 host=localhost port=5432";
$ret = pg_connect( $this->con_string );
}
}

?>

I could solve part of the problem by creating a user and database called 'www-data'.
Since I have several sites on the same server, I need more independent db-s, so this solution is not enough.
This seems to be a configuration problem, but I don't know where to turn off this (security?) option.

The versions are:
PHP Version 4.1.0RC1
PostgreSQL 7.1.3
Apache/1.3.22
Debian sid

Could anyone help me please?
Thanks, Peter

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Vince Vielhaber 2001-11-26 14:23:52 Re: Re: Secure pages
Previous Message Hal Davison 2001-11-20 19:49:59 Re: [PHP] postgresql array with PHP