kamesenin Posted May 3, 2017 Share 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 Link to comment Share on other sites More sharing options...
Krydos Posted May 3, 2017 Share Posted May 3, 2017 Does it work now? Quote Link to comment Share on other sites More sharing options...
Luigi123 Posted May 4, 2017 Share Posted May 4, 2017 Moved to Customer Service. Quote Link to comment Share on other sites More sharing options...
kamesenin Posted May 4, 2017 Author Share Posted May 4, 2017 Does it work now?Yes it does!, thanks! Quote Link to comment Share on other sites More sharing options...
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.