By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,178 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,178 IT Pros & Developers. It's quick & easy.

Edward

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.