Re: DB Error: connect failed
От | Andy Shellam |
---|---|
Тема | Re: DB Error: connect failed |
Дата | |
Msg-id | 44DF7E5B.6070807@mailnetwork.co.uk обсуждение исходный текст |
Ответ на | DB Error: connect failed (Fatih Gulec <fatihg@cs.hacettepe.edu.tr>) |
Ответы |
Re: DB Error: connect failed
|
Список | pgsql-php |
Faith, I'm guessing one of 2 things is happening here: - PHP is connecting through the Unix socket in /tmp, and permissions are wrong on the /tmp directory for the Apache user - Something like TCP wrappers is blocking localhost connections Try changing the connection host to the machine's ethernet IP address instead of 127.0.0.1, this will give you a clue if this is the case. You could also examine the PostgreSQL logs - I doubt if it would log this error, but it's worth a shot. Andy. Fatih Gulec wrote: > Here is the problem : > System : Fedora Core 5 > Application server : Apache (comes with Fedora base installation) > > 1. I could not connect to postgresql in php code whicih uses pear packet > DB. Here is the error code : > DB Error: connect failed [nativecode=Unable to connect to PostgreSQL > server: could not connect to server: Permission denied Is the server > running on host "127.0.0.1" and accepting TCP/IP connections on port > 5432?] ** pgsql://postgres:bbmprens@127.0.0.1/prens > > 2. By the way I can connect that db from an other machine which the system > is Windows XP and program is default PgAdmin. > 2. Alsa I can connect and use from a windows machine with the sama php > code that connects to the dbms which works on the Fedora Core 5. > 3. The user and password are tested by using pgsql command, in command > prompt. > > Thanks... > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly > > !DSPAM:37,44df4bd2143293352620759! > > >
В списке pgsql-php по дате отправления: