Yes, the issue is from SELinux. thank everybody for help
> [email protected] writes:
You do have a point on the "Permission denied", though. If the
problem was where I was suggesting, it would probably say "Connection
refused". Perhaps some OS security restriction is in play here
[email protected] writes:
>>> You do have a point on the "Permission denied", though. If the
>>> problem was where I was suggesting, it would probably say "Connection
>>> refused". Perhaps some OS security restriction is in play here.
>> SELinux? I've never used it personally but have heard it
Way not to answer the question.
On Fri, Jun 26, 2009 at 12:18 PM, wrote:
> I can run this php script from commandline and psql remote access works
>
>> What does your connect string for each look like (with passwords bleeped
>> out)?
>>
>> --
>> Sent via pgsql-admin mailing list (pgsql-admin@post
I can run this php script from commandline and psql remote access works
> What does your connect string for each look like (with passwords bleeped
> out)?
>
> --
> Sent via pgsql-admin mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mai
What does your connect string for each look like (with passwords bleeped out)?
--
Sent via pgsql-admin mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
i use fedora 11
>
>> If it was trying to get that sort of connection, rather than TCP/IP,
>> the message would be different. Something like:
>>
>> # could not connect to server: No such file or directory
>> # Is the server running locally and accepting
>> # connections on Unix domain socket "
If it was trying to get that sort of connection, rather than TCP/IP,
the message would be different. Something like:
# could not connect to server: No such file or directory
# Is the server running locally and accepting
# connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Ah ye
I think that permissions on the parent directories can result in this
error.
Carol
On Jun 26, 2009, at 1:07 PM, Kevin Grittner wrote:
Andy Shellam wrote:
[email protected] wrote:
Unable to connect to PostgreSQL server:
could not connect to server: Permission denied
Is the server running
the default port 5432 is associated with postgres and localhost is connected
# netstat -plunta | grep 5432
tcp0 0 127.0.0.1:5432 0.0.0.0:*
LISTEN 3962/postgres
tcp0 0 ::1:5432:::*
LISTEN 3
Andy Shellam wrote:
> [email protected] wrote:
>> 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? "
> Because the error is "Permission denied", I'm gue
Because the error is "Permission denied", I'm guessing it's permissions
on the /tmp/.s.PGSQL.5432 socket that will need checking?
The OP's PHP script when run standalone is probably running as root.
[email protected] wrote:
the error message in Apache error-log is " PHP Warning: pg_connect()
wrote:
> Is the server running on host "localhost"
> and accepting TCP/IP connections on port 5432?
Is it?
Depending on your platform, you can check which ports are accepting
connections with something like:
netstat -plnt
If you don't see your port open there, listening on all addresses
the error message in Apache error-log is " PHP Warning: pg_connect() [function.pg-connect]: Unable to connect to
PostgreSQL server: could not connect to server: Permission denied\n\tIs
the server running on host "localhost" and accepting\n\tTCP/IP
connections on port 5432? "
>
> It will be good
Some linux distros (debian, for example) have two php.ini files, one for
php scripts and a second one for Apache2 config.
Perhaps you have lost one of these files...
I assume you have installed mod-php for Apache.
-Original Message-
From: [email protected]
To: [email protected]
Yes, I did configured these two files, so, PHP can talk with postgres, but
Apache-owned PHP can not.
> On Thu, Jun 25, 2009 at 6:54 PM, wrote:
>> Hi gurus!
>>
>> my PHP scripts don't call upon the postgres database from within HTML
>> files served to web browsers by Apache, but PHP scritps itself
On Thu, Jun 25, 2009 at 6:54 PM, wrote:
> Hi gurus!
>
> my PHP scripts don't call upon the postgres database from within HTML
> files served to web browsers by Apache, but PHP scritps itself can access
> to database. I guess some configuration between PHP and Apache is wrong.
> Do anybody have any
16 matches
Mail list logo