aztech Posted January 1, 2011 Share Posted January 1, 2011 Hi everybody, I wrote this php script for connect to db: <?php $connessione=pg_connect("host=heliohost.org port=5432 dbname=aztech_prova user=aztech_fuma password=**********") or die("Database non disponibile"); ?> But it doesn't work, I receive this error: Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "65.19.143.2", user "aztech_fuma", database "aztech_prova", SSL off in /home1/aztech/public_html/registrazione.php on line 2 Database non disponibile Could you explain me the problem? Thank you Quote Link to comment Share on other sites More sharing options...
jje Posted January 1, 2011 Share Posted January 1, 2011 Although I have no experience of PostgreSQL, try replacing host=heliohost.org with host=stevie.heliohost.org Quote Link to comment Share on other sites More sharing options...
Guest Geoff Posted January 1, 2011 Share Posted January 1, 2011 Are you developing on your local computer, or heliohost? If you are connecting from your local computer, the connection might not work. Quote Link to comment Share on other sites More sharing options...
aztech Posted January 1, 2011 Author Share Posted January 1, 2011 Although I have no experience of PostgreSQL, try replacing host=heliohost.org with host=stevie.heliohost.org I already tried you're method but it still doesn't work. Are you developing on your local computer, or heliohost? If you are connecting from your local computer, the connection might not work. I tried to work online, it's the same. Quote Link to comment Share on other sites More sharing options...
jje Posted January 1, 2011 Share Posted January 1, 2011 Try... <?php $connessione=pg_connect("host=localhost dbname=aztech_prova user=aztech_fuma password=**********") or die("Database non disponibile"); ?> Sorry - I have no experience with PostgreSQL but I'll do the best I can. note: that code will only work if the script is on your heliohost website, not remotely Quote Link to comment Share on other sites More sharing options...
aztech Posted January 2, 2011 Author Share Posted January 2, 2011 Try... <?php $connessione=pg_connect("host=localhost dbname=aztech_prova user=aztech_fuma password=**********") or die("Database non disponibile"); ?> Sorry - I have no experience with PostgreSQL but I'll do the best I can. note: that code will only work if the script is on your heliohost website, not remotely Thank you very very much!!! Now it works!!!! Quote Link to comment Share on other sites More sharing options...
jje Posted January 2, 2011 Share Posted January 2, 2011 Your welcome! We got there in the end!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.