aztech Posted January 1, 2011 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
jje Posted January 1, 2011 Posted January 1, 2011 Although I have no experience of PostgreSQL, try replacing host=heliohost.org with host=stevie.heliohost.org
Guest Geoff Posted January 1, 2011 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.
aztech Posted January 1, 2011 Author 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.
jje Posted January 1, 2011 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
aztech Posted January 2, 2011 Author 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!!!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now