AH01215: DBI connect(‘dbname=name’,‘passw’,…) failed: could not connect t
AH01215: Is the server running locally and accepting
AH01215: connections on Unix domain socket “/tmp/.s.PGSQL.5432”? at /srv/www
End of script output before headers: page.pl
1.postgresql running and socket exist and have permission 777
2.sudo -uwwwrun /srv/www/cgi-bin/page.pl run without problem and error.
3.problem exist when running script under apache2.
Could AppArmor be protecting you by preventing Apache from doing weird
things like making connections to odd sockets? As a test, turn off the
AppArmor service and see if that works.
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…