Answer the question
In order to leave comments, you need to log in
Can't connect to postgres database, what's the problem?
On Linux Ubuntu Server 16.04(64-bit) web-server apache 2.2 postgres 9.5 php 7.2 and phppgadmin are installed and
so I connect to the database with this script:
<?php
$db=pg_connect ('host=localhost port=5432 dbname=base user =postgres password=1q2w3e ');
if(!db){
die ('Failed to connect to database');
}
?>
So I can't connect, although all the data is correct (I checked it with phppgadmin), I changed localhost to 127.0.0.1 and even to ip in the local network, nothing changes ..... tell me what could be...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question