Pgsql-PHP connection problem

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,

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.

This is the error message I get

"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........"


File settings:

Pg_hba.conf file settings:

local all all =
trust
host all all 127.0.0.1 255.255.255.255 =
trust


postgresql.conf file settings:

listen_addresses =3D '*'
port=3D'5432'


Does anyone know how to resolve this?

Thanks in advance.

Regards,

Nirav


--
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
Content-Type: text/html;
charset="windows-1250"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dwindows-1250">


<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D562240801-28092005><FONT size=3D2>Hi
Everyone,</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240801-28092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV>
<DIV><SPAN class=3D265070308-27092005><FONT size=3D2>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. </FONT></SPAN></DIV>
<DIV><SPAN class=3D265070308-27092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D265070308-27092005>
<DIV><SPAN class=3D281122307-21092005><STRONG><SPAN =
class=3D812301702-27092005><FONT
size=3D2>This is the error message I =
get</FONT></SPAN></STRONG></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><STRONG><SPAN
class=3D812301702-27092005></SPAN></STRONG></SPAN> </DIV>
<DIV><SPAN class=3D281122307-21092005><STRONG><FONT size=3D2>"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........"</FONT></STRONG></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><FONT =
size=3D2></FONT></SPAN> </DIV><SPAN
class=3D281122307-21092005></SPAN><SPAN class=3D281122307-21092005>
<DIV><BR><SPAN class=3D265070308-27092005><FONT size=3D2>File
settings:</FONT></SPAN></DIV>
<DIV><SPAN class=3D265070308-27092005><FONT
size=3D2></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D'"MS Sans Serif"'
size=3D2>Pg_hba.conf file settings:</FONT></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D"MS Sans Serif"
size=3D2><STRONG>local  all   
all           &nbs=
p;            =
;            =
            &=
nbsp;           &n=
bsp;           &nb=
sp;    <SPAN
class=3D671140106-26092005> </SPAN>trust<BR>host   =
all   
all           &nbs=
p;
127.0.0.1          &nbs=
p; 
255.255.255.255   <SPAN
class=3D671140106-26092005>       
</SPAN>trust<BR></STRONG></FONT></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D'"MS Sans Serif"'
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D'"MS Sans Serif"'
size=3D2>postgresql.conf file settings: </FONT></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D'"MS Sans Serif"'
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D281122307-21092005><FONT face=3D'"MS Sans Serif"'
size=3D2><STRONG>listen_addresses =3D '*' </STRONG></FONT></SPAN></DIV>
<DIV><SPAN class=3D281122307-21092005><SPAN =
class=3D671140106-26092005><FONT
face=3D"MS Sans Serif"
size=3D2><STRONG>port=3D'5432'</STRONG></FONT></SPAN></SPAN></DIV>
<DIV><FONT size=3D2></FONT> </DIV><SPAN
class=3D265070308-27092005></SPAN></SPAN><SPAN =
class=3D265070308-27092005>
<DIV><BR><SPAN class=3D562240801-28092005><FONT size=3D2>Does anyone =
know how to
resolve this? </FONT></SPAN></DIV>
<DIV><SPAN class=3D562240801-28092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D562240801-28092005><FONT size=3D2>Thanks in
advance.</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240801-28092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D562240801-28092005><FONT =
size=3D2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240801-28092005><FONT =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D562240801-28092005><FONT
size=3D2>Nirav</FONT></SPAN></SPAN></DIV></DIV>
<DIV><SPAN class=3D265070308-27092005><FONT
size=3D2></FONT></SPAN> </DIV></DIV></BODY></HTML>
<BR>

<P><FONT SIZE=3D2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Anti-Virus.<BR>
Version: 7.0.344 / Virus Database: 267.11.8/113 - Release Date: =
27/09/2005<BR>
</FONT> </P>

------_=_NextPart_001_01C5C3C8.F322D2BF--
Nirav Parikh [ Mi, 28 September 2005 03:10 ] [ ID #987832 ]

Re: Pgsql-PHP connection problem

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
John DeSoi [ Mi, 28 September 2005 04:16 ] [ ID #987833 ]
Datenbanken » gmane.comp.db.postgresql.php » Pgsql-PHP connection problem

Vorheriges Thema: postmaster does not start
Nächstes Thema: pg_fetch_object