Home  |  Linux  | Mysql  | PHP  | XML
From:Maarten Foqué Date:Tue Jun  9 08:25:06 2009
Subject:Re: pdo_pgsql connection problem
Ok,

we've found the problem:
SELINUX

for those of you who took the time reading my long question, thanks :)

regards,
Maarten

On Tue, 2009-06-09 at 10:07 +0200, Maarten Foqué wrote:
> Dear all,
>
> I'm running into a problem I just can't seem to get fixed. I've
> searched a long time for this already but haven't found anything that
> comes close to what I'm seeing.
> I'm trying to connect (and later use) a postgres database through php,
> using PDO.
>
> The webserver is a recently set up server solely for testing, there is a
> production server in place where everything works just fine.
>
> The web server (test): (from phpinfo)
> Linux hostname.domainname 2.6.25.11-97.fc9.x86_64 #1 SMP Mon Jul 21
> 01:09:10 EDT 2008 x86_64
> Apache 2.0
> PHP API 20041225
> PHP Extension 20060613
> PDO support enabled
> PDO drivers pgsql, sqlite
> PDO Driver for PostgreSQL enabled
> PostgreSQL(libpq) Version 8.3.1
> Module version 1.0.2
> Revision $Id: pdo_pgsql.c,v 1.7.2.11.2.1 2007/01/01 09:36:05 sebastian
> Exp $
>
> The working production server is running on 32 bit, and the database
> server is running fc9 x86_64 with postgres 8.3.5
>
> The error I keep getting:
> Connection failed to:pgsql:host=hostname.domainname port=5432;dbname=bla
> user=username password=secret
> SQLSTATE[08006] [7] could not connect to server: Permission denied\n\tIs
> the server running on host "hostname.domainname" and accepting\n\tTCP/IP
> connections on port 5432?
>
> I can use psql to connect to this database and from what I've seen I'm
> suspecting something wrong with pdo/pdo_pgsql or some config setting I
> overlooked somewhere in apache/php.
> Running tcpdump shows that nothing is even going out when trying the php
> PDO connection.
>
> Anything that can set me in the correct direction is greatly
> appreciated.
>
> kind regards,
> Maarten
>
Navigate in group php.db at sever news.php.net
Previous Next


Your recent visits
pdo_pgsql connection problem
Re: [PHP-DB] 64-bit Linux -- Fatal ... undefined function mysql_connect()
Test results for 5.2.5 [failed]
Re: [PHP-DB] 64-bit Linux -- Fatal ... undefined function mysql_connect()
RegExp



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants