X-Original-To: pgsql-php@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8B742475B07 for ; Mon, 17 Feb 2003 10:59:03 -0500 (EST) Received: from tomts10-srv.bellnexxia.net (tomts10.bellnexxia.net [209.226.175.54]) by postgresql.org (Postfix) with ESMTP id 59BFD474E42 for ; Mon, 17 Feb 2003 10:58:49 -0500 (EST) Received: from acer.sympatico.ca ([65.95.23.139]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20030217155853.GQZL26691.tomts10-srv.bellnexxia.net@acer.sympatico.ca> for ; Mon, 17 Feb 2003 10:58:53 -0500 Message-Id: <5.1.1.6.0.20030217105432.033b87d0@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.1.1 Date: Mon, 17 Feb 2003 10:55:48 -0500 To: pgsql-php@postgresql.org From: Frank Bax Subject: Re: PHP and POSTGRES under windows In-Reply-To: <20030215054157.66227.qmail@web21108.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/42 X-Sequence-Number: 1893 port 80 is typically http - the default for pgsql is 5432. At 12:41 AM 2/15/03, Raymond Chua Sing wrote: >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"); > exit; > } >?>" >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.