kamesenin Posted May 3, 2017 Posted May 3, 2017 This is the error: Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "::1", user "postgres", database "inmobiliaria", SSL off in /home/inver/public_html/inmobiliaria/consulta.php on line 12 This is the file that connects to the database. Although locally it works. <?php /*Conexion a la base de datos*/ $user = "inver_inverdata"; $password = "*******"; $dbname = "inver_inmobiliaria"; $port = "5432"; $host = "localhost"; $cadenaConexion = "host=$host port=$port dbname=$dbname user=$user password=$password"; $conexion = pg_connect($cadenaConexion) or die("Error en la Conexión: ".pg_last_error()); /*$query = "select id, usuario, contrasenia from usuario"; $resultado = pg_query($conexion, $query) or die("Error en la Consulta SQL"); */ ?> Quote
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.