Thread: Edward

Edward

From
ejos@epca.com.ve
Date:
  Hi!, First i'm a beginner working with php. And i've a problem working
with that and postgresql of course, i cann't connect both.
  I've been working with debian sid, and like usually the webserver is
apache; the error is something like thist: "error .... cannot locale
host:localhost...", but i try to do this: "# psql -h localhost -U xxx -p
5432 -d test " and  i make connection.

 In test.php, i change localhost by 127.0.0.1, and nothing, the same
error, and phpinfo() work.

   So is somebody help me. thanks!


Re: Edward

From
Richard Huxton
Date:
On Monday 29 September 2003 14:41, ejos@epca.com.ve wrote:
>   Hi!, First i'm a beginner working with php. And i've a problem working
> with that and postgresql of course, i cann't connect both.
>   I've been working with debian sid, and like usually the webserver is
> apache; the error is something like thist: "error .... cannot locale
> host:localhost...", but i try to do this: "# psql -h localhost -U xxx -p
> 5432 -d test " and  i make connection.
>
>  In test.php, i change localhost by 127.0.0.1, and nothing, the same
> error, and phpinfo() work.

Perhaps choose a more informative subject next time :-)

This is almost certainly a typing error in your PHP connection string. It
should be something like:

$conn = pg_connect("host=localhost dbname=test user=test password=tpass");

If your connect string is of that type, please give the *exact* error message
you receive.

--
  Richard Huxton
  Archonet Ltd