Search Postgresql Archives

PHP and PostgreSQL 9.0, pg_connect fails to connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm having trouble figuring out where this one is going wrong. It's a brand new install of PostgreSQL 9.0 from PGDG on a RHEL5 box, running Apache 2.2 and PHP 5.3 (from IUS).

- PostgreSQL 9.0 is running and listening on the localhost. I can run pgAdmin III and connect to it over a SSH port-forward to the loopback.

- nmap reports that pgsql is alive and listening on localhost:5432.

- I can use the psql command to connect to the localhost and am able to login as the username/password that I'm using in the pg_connect() call. I can connect to the target database. I can create tables in the database/schema using that username (so pgsql roles don't seem to be the issue).

- SELinux is running, but there are no denied messages in /var/log/audit/audit.log and no setroubleshooting alerts in /var/log/messages either.

- The firewall doesn't seem to be the issue (due to the nmap query).

- I've tried forcing IPv4 by specifying the database server as 127.0.0.1 instead of localhost.

- No errors in the Apache logs either.

- The server came with PHP 5.1.6 and I've tried out an early version of PHP 5.3, then upgraded to 5.3.6.

All I'm getting back from pg_connect() is "Connect: failed to connect to database.".

Is there a specific minimum version of the php-pgsql add-on that is needed in order to talk to a pgsql 9.0 database? Am I going to need to compile PHP from source (using the pgsql 9.0 developer packages)?


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux