Unable to connect to Postgres via PHP but can connect from command line and PgAdmin on different machine

后端 未结 1 727
故里飘歌
故里飘歌 2020-12-10 20:23

I\'ve had a quick search around (about 30 minutes) and tried a few bits, but nothing seems to work. Also please note I\'m no Linux expert (I can do most basic stuff, simple

1条回答
  •  遥遥无期
    2020-12-10 20:50

    OK... Answered... Was a problem with SELinux. Needed to run the following....

    setsebool -P httpd_can_network_connect_db on
    

    Also if you need to check if SELinux is causing issues it can be turned off with the following

    setenforce 0
    

    Then once finished

    setenforce 1
    

    Anyways, done... onwards!

    0 讨论(0)
提交回复
热议问题