pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems connecting (from php to pg)
3+ messages / 2 participants
[nested] [flat]

* Problems connecting (from php to pg)
@ 2008-06-07 20:57 Carlos Costa <ccosta@gmail.com>
  2008-06-09 20:17 ` Re: Problems connecting (from php to pg) Daniel Alejandro <dcarreroc@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Carlos Costa @ 2008-06-07 20:57 UTC (permalink / raw)
  To: pgsql-php

Hello all,

I've the "standard connection error":

Unable to connect to PostgreSQL server: could not connect to server:
Permission denied.
Is the server running on host "localhost" and accepting TCP/IP
connections on port 5432?

The system is, yes, running and -I think- accepting TCP/IP connections
(I've tested this with netstat, I can connect to it with psql -h
localhost, and so).

In the server where I am testing this I have FC7 installed, so the php
and the pgsql-php packages are:

PHP Version 5.2.6
PostgreSQL(libpq) Version 	8.2.7

I think that there is a problem in the pgsql-php module. I've created
a ssh tunnel, and trying the connection to the same database from
other server (with PHP Version 5.2.5-3 and pgsql that supports
postgresql 8.3.0).

The postgresql version in the server is the 8.3.0.

What can we do? I am doing these tests with a simple php code (just a
pg_connect()).

Thanks in advance,
  Carlos.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problems connecting (from php to pg)
  2008-06-07 20:57 Problems connecting (from php to pg) Carlos Costa <ccosta@gmail.com>
@ 2008-06-09 20:17 ` Daniel Alejandro <dcarreroc@gmail.com>
  2008-06-09 20:50   ` Re: Problems connecting (from php to pg) Carlos Costa <ccosta@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Daniel Alejandro @ 2008-06-09 20:17 UTC (permalink / raw)
  To: Carlos Costa <ccosta@gmail.com>; +Cc: pgsql-php

2008/6/7 Carlos Costa <ccosta@gmail.com>:
> Hello all,
>
> I've the "standard connection error":
>
> Unable to connect to PostgreSQL server: could not connect to server:
> Permission denied.
> Is the server running on host "localhost" and accepting TCP/IP
> connections on port 5432?
>
> The system is, yes, running and -I think- accepting TCP/IP connections
> (I've tested this with netstat, I can connect to it with psql -h
> localhost, and so).
>
> In the server where I am testing this I have FC7 installed, so the php
> and the pgsql-php packages are:
>
> PHP Version 5.2.6
> PostgreSQL(libpq) Version       8.2.7
>
> I think that there is a problem in the pgsql-php module. I've created
> a ssh tunnel, and trying the connection to the same database from
> other server (with PHP Version 5.2.5-3 and pgsql that supports
> postgresql 8.3.0).
>
> The postgresql version in the server is the 8.3.0.
>
> What can we do? I am doing these tests with a simple php code (just a
> pg_connect()).
>
> Thanks in advance,
>  Carlos.
>
> --
> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-php
>
Did you check your pg_hba.conf file ???

Bye :)
-- 
Daniel Carrero Canales



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problems connecting (from php to pg)
  2008-06-07 20:57 Problems connecting (from php to pg) Carlos Costa <ccosta@gmail.com>
  2008-06-09 20:17 ` Re: Problems connecting (from php to pg) Daniel Alejandro <dcarreroc@gmail.com>
@ 2008-06-09 20:50   ` Carlos Costa <ccosta@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Carlos Costa @ 2008-06-09 20:50 UTC (permalink / raw)
  To: Daniel Alejandro <dcarreroc@gmail.com>; +Cc: pgsql-php

Thank you, Daniel and all. My problem was not related to pg, but to
selinux. I disabled selinux, and all runs fine now.

On Mon, Jun 9, 2008 at 10:17 PM, Daniel Alejandro <dcarreroc@gmail.com> wrote:
> 2008/6/7 Carlos Costa <ccosta@gmail.com>:
>> Hello all,
>>
>> I've the "standard connection error":
>>
>> Unable to connect to PostgreSQL server: could not connect to server:
>> Permission denied.
>> Is the server running on host "localhost" and accepting TCP/IP
>> connections on port 5432?
>>
>> The system is, yes, running and -I think- accepting TCP/IP connections
>> (I've tested this with netstat, I can connect to it with psql -h
>> localhost, and so).
>>
>> In the server where I am testing this I have FC7 installed, so the php
>> and the pgsql-php packages are:
>>
>> PHP Version 5.2.6
>> PostgreSQL(libpq) Version       8.2.7
>>
>> I think that there is a problem in the pgsql-php module. I've created
>> a ssh tunnel, and trying the connection to the same database from
>> other server (with PHP Version 5.2.5-3 and pgsql that supports
>> postgresql 8.3.0).
>>
>> The postgresql version in the server is the 8.3.0.
>>
>> What can we do? I am doing these tests with a simple php code (just a
>> pg_connect()).
>>
>> Thanks in advance,
>>  Carlos.
>>
>> --
>> Sent via pgsql-php mailing list (pgsql-php@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-php
>>
> Did you check your pg_hba.conf file ???
>
> Bye :)
> --
> Daniel Carrero Canales
>



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2008-06-09 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-06-07 20:57 Problems connecting (from php to pg) Carlos Costa <ccosta@gmail.com>
2008-06-09 20:17 ` Daniel Alejandro <dcarreroc@gmail.com>
2008-06-09 20:50   ` Carlos Costa <ccosta@gmail.com>

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