Skip site navigation (1) Skip section navigation (2)

Re: PHP and POSTGRES under windows

From: "Grant Henderson" <granth(at)fusion-advertising(dot)co(dot)uk>
To: <pgsql-php(at)postgresql(dot)org>
Subject: Re: PHP and POSTGRES under windows
Date: 2003-02-17 09:38:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
We use this at work

pg_connect("host={$hostname} dbname={$dbname} user={$user}

I don't think you need to specify the port....

-----Original Message-----
From: Raymond Chua Sing [mailto:mondi0924(at)yahoo(dot)com] 
Sent: 15 February 2003 05:42
To: pgsql-php(at)postgresql(dot)org
Subject: [PHP] PHP and POSTGRES under windows

I have recently installed PHP and postgres(windows
version by peerdirect) I accomplished linking the
extension of postgres to php and made postgres to work
with pgadminnII but I can't connect to the database
using postgres functions this error always shows up on
my page:
"Unable to connect to PostgreSQL server:
connectDBStart() -- socket() failed: errno=2 No such
file or directory "
and this code is what I use to connect to the DB
   // Database variables
   // $dbhost      = "db";
   $dbname      = "hbcdb";
   $dbusername  = "Mondi0924";
   $dbpassword  = "1236964";

   $dbconn = pg_connect("dbname=$dbname
user=$dbusername password=$dbpassword port=80");
   if (!$dbconn)
      header("Location: error.php3?errorcode=1");
I have been using postgres in the office using a linux
server thats why I need postgres at home could you
please help me thx.

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

pgsql-php by date

Next:From: angelo.rigoDate: 2003-02-17 15:47:52
Subject: tcp connections
Previous:From: Raymond Chua SingDate: 2003-02-15 05:41:57
Subject: PHP and POSTGRES under windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group