Maestro!
Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: no 
pg_hba.conf entry for host "192.168.1.100", user "postgres", database "banco" 
in /var/www/index.php on line 3 Warning: pg_errormessage(): No PostgreSQL link 
opened yet in /var/www/index.php on line 3

Gracias Fabio!!!

De: Fabio Arias [mailto:fhar...@gmail.com]
Enviado el: Jueves, 29 de Septiembre de 2011 03:57 p.m.
Para: Gustavo Rosso
CC: pgsql-es-ayuda
Asunto: Re: [Probable Correo Basura] Re: [pgsql-es-ayuda] conexion
Importancia: Baja

Revisa tu PHP.ini haber si tiene habilita el mostrar los errores.

De todos modos intenta usar pg_pconnect() en lugar de pg_connect()


Fabio Hernando Arias Vera
Ingeniero de Sistemas
IT Manger & Founder BrainWinner Group SAS
follow me @fabioariasvera
Cel. +57 320 8494130


El 29 de septiembre de 2011 13:54, Gustavo Rosso 
<gro...@sadaic.org.ar<mailto:gro...@sadaic.org.ar>> escribió:
Gracias Fabio por tu ayuda, hago
<?php
$conex = pg_connect("host=192.168.1.100 dbname=banco user=postgres 
password=1234") or die(pg_errormessage());
?>

Pero la pagina sigue en blanco...

De: Fabio Arias [mailto:fhar...@gmail.com<mailto:fhar...@gmail.com>]
Enviado el: Jueves, 29 de Septiembre de 2011 03:48 p.m.
Para: Gustavo Rosso
CC: pgsql-es-ayuda
Asunto: Re: [Probable Correo Basura] Re: [pgsql-es-ayuda] conexion
Importancia: Baja

Usa en el die esto

$conex = pg_connect("host=192.168.1.100 dbname=banco user=postgres 
password=123") or die(pg_errormessage());

Fabio Hernando Arias Vera
Ingeniero de Sistemas
IT Manger & Founder BrainWinner Group SAS
follow me @fabioariasvera
Cel. +57 320 8494130<tel:%2B57%20320%208494130>

El 29 de septiembre de 2011 13:45, Gustavo Rosso 
<gro...@sadaic.org.ar<mailto:gro...@sadaic.org.ar>> escribió:
Si le saco el die, aparece la pagina en blanco, pero intento hacer una consulta 
y sale por el die de la misma

<?php
phpinfo();
$conex = pg_connect("host=192.168.1.100 dbname=banco user=postgres 
password=123");
$sql = "select * from empresas";
pg_query($conex,$sql) or die ('sin conexion');
while( $row = pg_fetch_array ( $result,$i )) {
   echo $row [ "id" ];
   echo $row [ "nombre" ];
   $i++;
}

?>
El 29 de septiembre de 2011 13:33, Gustavo Rosso 
<gro...@sadaic.org.ar<mailto:gro...@sadaic.org.ar>> escribió:
Buenas tardes.
No logro conectar php5 con postgresql.
Tengo debían con php5 con postgresql 8.3.7, esta instalada la librería 
php-pgsql, reinicie apache2, pero sigo sin conectarme.
El scrip phpinfo() me dice que ve a postgres.
Intento la conexión con
<?php
$conex = pg_connect("host=192.168.1.100 dbname=banco user=postgres 
password=12345") or die ('Fallo conexion');
El mensaje siempre es 'fallo conexion'.

Que mas debo mirar?
Muchas gracias!

________________________________

La información contenida en esta comunicación se dirige exclusivamente para el 
uso de la persona o entidad a quien va dirigida y otros autorizados para 
recibirlo. Puede contener información confidencial o legalmente protegida. Si 
usted no es el destinatario indicado, queda notificado de que cualquier 
revelación, copia, distribución o tomar cualquier acción basada en el contenido 
de esta información está estrictamente prohibida y puede ser ilegal. Si usted 
ha recibido esta comunicación por error, le rogamos nos lo notifique 
inmediatamente respondiendo a este correo y elimine de su sistema. SADAIC no es 
responsable de la transmisión correcta y completa de la información contenida 
en esta comunicación, ni por cualquier retraso en su recepción.

The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by responding to this 
email and then delete it from your system. SADAIC is neither liable for the 
proper and complete transmission of the information contained in this 
communication nor for any delay in its receipt.


________________________________

La información contenida en esta comunicación se dirige exclusivamente para el 
uso de la persona o entidad a quien va dirigida y otros autorizados para 
recibirlo. Puede contener información confidencial o legalmente protegida. Si 
usted no es el destinatario indicado, queda notificado de que cualquier 
revelación, copia, distribución o tomar cualquier acción basada en el contenido 
de esta información está estrictamente prohibida y puede ser ilegal. Si usted 
ha recibido esta comunicación por error, le rogamos nos lo notifique 
inmediatamente respondiendo a este correo y elimine de su sistema. SADAIC no es 
responsable de la transmisión correcta y completa de la información contenida 
en esta comunicación, ni por cualquier retraso en su recepción.

The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by responding to this 
email and then delete it from your system. SADAIC is neither liable for the 
proper and complete transmission of the information contained in this 
communication nor for any delay in its receipt.


________________________________

La información contenida en esta comunicación se dirige exclusivamente para el 
uso de la persona o entidad a quien va dirigida y otros autorizados para 
recibirlo. Puede contener información confidencial o legalmente protegida. Si 
usted no es el destinatario indicado, queda notificado de que cualquier 
revelación, copia, distribución o tomar cualquier acción basada en el contenido 
de esta información está estrictamente prohibida y puede ser ilegal. Si usted 
ha recibido esta comunicación por error, le rogamos nos lo notifique 
inmediatamente respondiendo a este correo y elimine de su sistema. SADAIC no es 
responsable de la transmisión correcta y completa de la información contenida 
en esta comunicación, ni por cualquier retraso en su recepción.

The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by responding to this 
email and then delete it from your system. SADAIC is neither liable for the 
proper and complete transmission of the information contained in this 
communication nor for any delay in its receipt.


________________________________

La información contenida en esta comunicación se dirige exclusivamente para el 
uso de la persona o entidad a quien va dirigida y otros autorizados para 
recibirlo. Puede contener información confidencial o legalmente protegida. Si 
usted no es el destinatario indicado, queda notificado de que cualquier 
revelación, copia, distribución o tomar cualquier acción basada en el contenido 
de esta información está estrictamente prohibida y puede ser ilegal. Si usted 
ha recibido esta comunicación por error, le rogamos nos lo notifique 
inmediatamente respondiendo a este correo y elimine de su sistema. SADAIC no es 
responsable de la transmisión correcta y completa de la información contenida 
en esta comunicación, ni por cualquier retraso en su recepción.

The information contained in this communication is intended solely for the use 
of the individual or entity to whom it is addressed and others authorized to 
receive it. It may contain confidential or legally privileged information. If 
you are not the intended recipient you are hereby notified that any disclosure, 
copying, distribution or taking any action in reliance on the contents of this 
information is strictly prohibited and may be unlawful. If you have received 
this communication in error, please notify us immediately by responding to this 
email and then delete it from your system. SADAIC is neither liable for the 
proper and complete transmission of the information contained in this 
communication nor for any delay in its receipt.

Reply via email to