470,826 Members | 1,941 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,826 developers. It's quick & easy.

Edward

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!
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #1
1 1056
On Monday 29 September 2003 14:41, ej**@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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

45 posts views Thread by Edward K. Ream | last post: by
42 posts views Thread by Edward Diener | last post: by
34 posts views Thread by Duncan McNutt [BSDM] | last post: by
3 posts views Thread by John Salerno | last post: by
4 posts views Thread by Edward van Nijmweegen | last post: by
16 posts views Thread by Edward | last post: by
127 posts views Thread by sanjay.vasudevan | last post: by
6 posts views Thread by =?Utf-8?B?RWR3YXJk?= | last post: by
14 posts views Thread by =?Utf-8?B?RWR3YXJk?= | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.