Search the Community
Showing results for tags 'pg_connect()'.
-
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"); */ ?>
- 3 replies
-
- postgresql
- php
-
(and 1 more)
Tagged with: