From: Laukó Péter <plauko@freemail.hu>
To: pgsql-php@postgresql.org
Subject: Connection problem
Date: Sat, 24 Nov 2001 23:36:12 +0100 (CET)
Message-ID: <freemail.20011024233612.47743@fm3.freemail.hu> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: plauko@freemail.hu
Subject: Re: Connection problem
In-Reply-To: <freemail.20011024233612.47743@fm3.freemail.hu>
References: <freemail.20011024233612.47743@fm3.freemail.hu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox