Unable to connect to PostgreSQL server
问题 I'm trying to connect to the PostgreSQL database of my app on Heroku: $host = "ec2-54-235-242-31.compute-1.amazonaws.com"; $username = "user"; $password = "pass"; $database = "dbname"; $port = "5432"; $dbconn = pg_connect("host=".$host." port=".$port ." dbname=".$database." user=".$username." password=".$password) or die('Could not connect: ' . pg_last_error()); but I'm getting this error: Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: FATAL: no pg_hba