Installing PostgreSQL and connecting to DB
-
Hi!
I have some problem with connecting to my PostgreSql Database.$con = pg_connect("
host=ec2-107-21-99-176.compute-1.amazonaws.com
port=5432
dbname=d3c61t0ne622qg
user=vusnbpashokbzw
password=****
") or die("Could not connect" . pg_last_error());$stat = pg_connection_status($con);
if ($stat === PGSQL_CONNECTION_OK) {
echo 'Connection status ok';
} else {
echo 'Connection status bad';
}When i open in browser my index.php - i see this mistake
Maybe someone has a solution?
-
It seems your DB is not configured to accept connetions from your Omega's IP.
-
@Patryk-Wychowaniec
I don't think so, because i can connect to my DB from any computer which has PHP & pgsql driver (or module).
I think that the problem in pg_hba.conf. Omega has not full postgresql package, so i can't configure some files (for example pg_hba.conf - this file include parameters for connecting to specific host).So now I don't have any idea how to fix this issue
-
I also have a similar problem, i was trying to get python' s psycopg2 to work on omega2+ but i cant seem to get pg_config for the omega installed, i also have opened a ticket ~1.5 months ago #7929 but still no reply/news from onion side