From: | Il Paolone <bigpaul(at)flashnet(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Debian php3+postgresql unable to connect |
Date: | 2000-01-16 19:21:20 |
Message-ID: | 38821A30.8A9EAF27@flashnet.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have Debian 2.1
PostgreSQL 6.5.3
with PHP 3.0.5
e php-pgsql module
I have set up everything. Apache works, php works, pgsql module is
loaded but this is the message whe i try to connect to the db:
Unable to connect to PostgresSQL server: connectDB() failed: Is the
postmaster running and accepting TCP/IP(with -i) connections at
'bigpaul' on port '5432'? in /var/www/ciao.php3 on line 34
The sintax to connect to the db is:
<?PHP
$dbserver = "bigpaul"; //bigpaul is my server name
$dbport = "5432";
$database = "gestione";
$conn = pg_Connect ("host=$dbserver port=$dbport dbname=$database");
if (!$conn) { // Errore accesso al database
echo "Si è verificato un errore.\n";
} else {
pg_Exec................
In the documentation it is written that if you have this kind of problem
it means that:
1) the postmaster it is not running
2) you have not specified the server name.
But:
I have the capabilities to use psql so I think that the postmaster is
running (I can create db, tables etc.)
I have specified, omitted, declared as "127.0.0.1" the server name
So what can I do?
Thanks
G.
--
LDR - Linux Domande e Risposte: http://web.tiscalinet.it/linuxfaq
Pluto mirror: http://www.pluto.linux.it/ildp/LDR
Gaetano Paolone <bigpaul(at)flashnet(dot)it>
E non dimenticate Linuxlinks: http://jump.to/linuxlinks
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 2000-01-16 21:08:12 | Re: [GENERAL] Debian php3+postgresql unable to connect |
Previous Message | Marc Tardif | 2000-01-16 18:57:45 | pg_dump: couldn't find the template1 database. |