Pgsql-PHP connection problem

Pgsql-PHP connection problem

am 28.09.2005 03:10:07 von Nirav Parikh

This is a multi-part message in MIME format.

------_=_NextPart_001_01C5C3C8.F322D2BF
Content-Type: text/plain;
charset="windows-1250"
Content-Transfer-Encoding: quoted-printable

Hi Everyone,
=20
I have setup new server running on Fedora Core 4. I am having problem =
connecting Php to Postgresql database. Now I also got couple of old =
server running same thing. I can connect through one of the existing =
server to this Postgresql database on new server. But Can't connect =
locally.=20
=20
This is the error message I get
=20
"DB_Error Object ( [error_message_prefix] =3D> [mode] =3D> 1 [level] =
=3D> 1024 [code] =3D> -24 [message] =3D> DB Error: connect failed =
[userinfo] =3D> [nativecode=3DWarning: pg_pconnect() =
[function.pg-pconnect]: 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? in =
/usr/share/pear/DB/pgsql.php on line 124] ** pgsql........"
=20

File settings:
=20
Pg_hba.conf file settings:
=20
local all all =
trust
host all all 127.0.0.1 255.255.255.255 =
trust

=20
postgresql.conf file settings:=20
=20
listen_addresses =3D '*'=20
port=3D'5432'
=20

Does anyone know how to resolve this?=20
=20
Thanks in advance.
=20
Regards,
=20
Nirav
=20

--=20
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: =
27/09/2005
=20

------_=_NextPart_001_01C5C3C8.F322D2BF
Content-Type: text/html;
charset="windows-1250"
Content-Transfer-Encoding: quoted-printable



charset=3Dwindows-1250">




Hi=20
Everyone,

size=3D2> 


I have setup new =
server running=20
on Fedora Core 4. I am having problem connecting Php to Postgresql =
database. Now=20
I also got couple of old server running same thing. I can connect =
through one of=20
the existing server to this Postgresql database on new server. But Can't =
connect=20
locally.

size=3D2> 


class=3D812301702-27092005> size=3D2>This is the error message I =
get

class=3D812301702-27092005> 

"DB_Error =
Object (=20
[error_message_prefix] =3D> [mode] =3D> 1 [level] =3D> 1024 =
[code] =3D> -24=20
[message] =3D> DB Error: connect failed [userinfo] =3D> =
[nativecode=3DWarning:=20
pg_pconnect() [function.pg-pconnect]: Unable to connect to PostgreSQL =
server:=20
could not connect to server: Permission denied Is the server running on =
host=20
"127.0.0.1" and accepting TCP/IP connections on port 5432? in=20
/usr/share/pear/DB/pgsql.php on line 124] **=20
pgsql........"

size=3D2> 
class=3D281122307-21092005>


File=20
settings:

size=3D2> 

size=3D2>Pg_hba.conf file settings:

size=3D2> 

size=3D2>local  all   =20
all           &nbs=
p;            =
;            =
            &=
nbsp;           &n=
bsp;           &nb=
sp;     class=3D671140106-26092005>
trust
host   =
all   =20
all           &nbs=
p;=20
127.0.0.1          &nbs=
p; =20
255.255.255.255    class=3D671140106-26092005>       =20
trust

size=3D2> 

size=3D2>postgresql.conf file settings:

size=3D2> 

size=3D2>listen_addresses =3D '*'

class=3D671140106-26092005> face=3D"MS Sans Serif"=20
size=3D2>port=3D'5432'

 
class=3D265070308-27092005>
class=3D265070308-27092005>

Does anyone =
know how to=20
resolve this?

size=3D2> 

Thanks in=20
advance.

size=3D2> 

size=3D2>Regards,

size=3D2> 

size=3D2>Nirav

size=3D2> 




--

No virus found in this outgoing message.

Checked by AVG Anti-Virus.

Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: =
27/09/2005



------_=_NextPart_001_01C5C3C8.F322D2BF--

Re: Pgsql-PHP connection problem

am 28.09.2005 04:16:15 von John DeSoi

On Sep 27, 2005, at 9:10 PM, Nirav Parikh wrote:

> I have setup new server running on Fedora Core 4. I am having
> problem connecting Php to Postgresql database. Now I also got
> couple of old server running same thing. I can connect through one
> of the existing server to this Postgresql database on new server.
> But Can't connect locally.

Have you verified it is specifically a PHP problem? Can you connect
with psql?

psql -h 127.0.0.1 dbname



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster