Post Installation PostgreSQL problem


(Uberdrag) #1

Hello,


I've installed a new VPS on CentOS 6 with all the required packages for Squiz.



All the installation steps went flawlessly, but when I try to run the Squiz via web It throws me this error:


    
    Fatal error: Uncaught exception 'Exception' with message 'Could not create database connection: DBError!:SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?' in /var/www/squiz_matrix/core/include/mysource.inc:3554 Stack trace: #0 /var/www/squiz_matrix/core/include/mysource.inc(258): MySource->changeDatabaseConnection('db') #1 /var/www/squiz_matrix/core/include/init.inc(281): MySource->init() #2 /var/www/squiz_matrix/core/web/index.php(28): require_once('/var/www/squiz_...') #3 {main} thrown in /var/www/squiz_matrix/core/include/mysource.inc on line 3554


Any tips or advice?

Thank you

(Dan Simmons) #2

Firstly, is postgresql definitely running? Could you post your postgresql.conf file? It looks as though either postgres is not listening on a local unix socket or the path to the socket is wrong.


Also, could you paste us the output of the following commands run from a console on the server:


    ls -la /tmp/
    sudo netstat -lnp |grep post


Thanks,
Dan.

(Uberdrag) #3

I don't know what was the actual problem, PostgreSQL installed properly and running, but I've fixed it by disabling SELinux protection, since I'm installing Squiz in a local network protected by hundreds of firewalls, I could give up on this one. :slight_smile:


Solved. Thanks.


(Chris Smith) #4

[quote]
I don't know what was the actual problem, PostgreSQL installed properly and running, but I've fixed it by disabling SELinux protection, since I'm installing Squiz in a local network protected by hundreds of firewalls, I could give up on this one. :slight_smile:



Solved. Thanks.

[/quote]

I don't know the rule you should add but the 'permission denied' error was the key to working out it was SeLinux. If postgres wasn't running it would be a 'no such file or directory' type message and being a file in /tmp you should be able to read it. http://linux.die.net/man/8/httpd_selinux might give some more targeted info if you wanted to check it out further.