Unix Domain Socket Error

Started by Jeremiah Megieabout 21 years ago2 messagesgeneral
Jump to latest
#1Jeremiah Megie
jmegie@gmail.com

I've used postgres before numerous times, but I can't seem to correct
this issue. I am using PostgreSQL 7.3.4 and Fedora Core 1. I had
postgres setup and working correctly. My php scripts were interfacing
with it, no problems.

We then had our server re-formatted and had ensim installed. The
virtual domains don't seem to use postgres independantly (like apache,
sendmail, etc.). So, I imported my existing database and it works
fine from the command prompt.

However, I cannot access it from the web:
http://creatyve.zgsolutions.com/php/glossary/

And I cannot login using phpPgAdmin.

I get the following error:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could
not connect to server: Permission denied Is the server running locally
and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
in /home/virtual/site2/fst/home/jeremiah/public_html/creatyve/php/glossary/common.php
on line 196

Warning: pg_connect(): Unable to connect to PostgreSQL server: could
not connect to server: Permission denied Is the server running locally
and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
in /home/virtual/site2/fst/home/jeremiah/public_html/creatyve/php/glossary/index.php
on line 34
Could not open connection to database server

I know it's not a problem in the code because it was working two days
ago on the other server. I've checked pg_hba.conf, and it seems
correct, although I'm not sure.

I also tried adding the '-i' option to the daemon startup, but it fails.

Any suggestions guys?

Thanks for any help!
Jeremiah

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jeremiah Megie (#1)
Re: Unix Domain Socket Error

Jeremiah Megie <jmegie@gmail.com> writes:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could
not connect to server: Permission denied Is the server running locally
and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Check the file permissions on the socket file ... is it world writable?

regards, tom lane