Re: [Probable Correo Basura] Re: conexion

From: Miguel Angel Hernandez Moreno <miguel(dot)hdz(dot)mrn(at)gmail(dot)com>
To: Gustavo Rosso <GRosso(at)sadaic(dot)org(dot)ar>
Cc: pgsql-es-ayuda <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: [Probable Correo Basura] Re: conexion
Date: 2011-09-29 19:08:45
Message-ID: CAGYOd3ov+ODkf9Y=aFEp80JE+tPjoLBP-P1GGLLx4daZ8y4+sA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host
"192.168.1.100",
Checa tu ph_hba.conf y dale permisoa la ip 192.168.1.100

De igual forma cuando configuras el php para usar postgres puedes verificar
de la siguiente manera

<?php

if (function_exists('pg_connect')) {
echo "Las funciones de PGSQL están disponibles.<br />\n";
} else {
echo "Las funciones de PGSQL no están disponibles.<br />\n";

}
?>

El 29 de septiembre de 2011 14:07, Gustavo Rosso <GRosso(at)sadaic(dot)org(dot)ar>escribió:

> 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:fharias(at)gmail(dot)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 <GRosso(at)sadaic(dot)org(dot)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:fharias(at)gmail(dot)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
>
>
>
> El 29 de septiembre de 2011 13:45, Gustavo Rosso <GRosso(at)sadaic(dot)org(dot)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 <GRosso(at)sadaic(dot)org(dot)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.
>

--
ISC Miguel Angel Hernandez Moreno

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Gustavo Rosso 2011-09-29 19:16:56 RV: [Probable Correo Basura] Re: conexion
Previous Message Gustavo Rosso 2011-09-29 19:07:20 RE: [Probable Correo Basura] Re: conexion