`
qiujiayu
  • 浏览: 173644 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Unable to connect to PostgreSQL server: could not connect to server: Permission

阅读更多

When running a php page from the browser a connect ion to Postgresql is denied even when it can be  accessed by pgadmin normally.

1- Run the php page from the prompt, for example, if page is named: conntest.php:

php /var/www/html/conntest.php

If it is sucessful then Apache is probably being blocked by SElinux.

2-

#gedit /etc/selinux/config

 

 

disable SElinux and reboot... congratulations, now it is working.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics