Jump to content

Recommended Posts

Posted (edited)

Hi,

 

i'm using postgresql and php - it's running fine :)

 

I recently added a second database user (wambachr_osmuser) and granted r/o access to my tables. This userid/password will be visible to any user reading the php-script. But that is ok for me.

 

Now i'm getting error "Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "65.19.143.6", user "wambachr_osmuser", database "wambachr_osm", SSL off in ..."

 

That is Tommies ip address and i think this should be added to pg_hba_conf too. Better using Tommys name instead of ip address, i think.

 

BUT i'm not 100% shure if this is the correct way, and you may tell me a better solution.

 

regards

walter aka wambacher

btw: "osm" stands for https://OpenStreetMap.org

Edited by wambachr
Posted (edited)

sorry, no :(

$dbconn = pg_connect("host=127.0.0.1 dbname=wambachr_osm user=wambachr_osmuser password=public");


=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "127.0.0.1", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31

 

$dbconn = pg_connect("host=localhost dbname=wambachr_osm user=wambachr_osmuser password=public");


=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "::1", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31

 

$dbconn = pg_connect("host=tommy.heliohost.org dbname=wambachr_osm user=wambachr_osmuser password=public");

 

=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "65.19.143.6", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31


$dbconn = pg_connect("host=65.19.143.6 dbname=wambachr_osm user=wambachr_osmuser password=public");


=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "65.19.143.6", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31

 

$dbconn = pg_connect("host=wambachr.heliohost.org dbname=wambachr_osm user=wambachr_osmuser password=public");


=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "65.19.143.6", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31

even tried "no host"
 


$dbconn = pg_connect("dbname=wambachr_osm user=wambachr_osmuser password=public");


=> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "[local]", user "wambachr_osmuser", database "wambachr_osm", SSL off in /home/wambachr/public_html/getSoftware4.php on line 31

regards
walter

 

Testpage http://wambachr.heliohost.org/SoftwareWatchlist4.html will try to connect using "$dbconn = pg_connect("host=localhost dbname=wambachr_osm user=wambachr_osmuser password=public");  not working

 

switching to real db admin and his db password will work.

 

Edited by wambachr
Posted

Try localhost now. I compared the Johnny config to the Tommy config, and somehow I forgot to add the ipv6 localhost to Tommy when I set him up. It's odd that no one has noticed it before now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...