Re: PHP and POSTGRES under windows

Поиск
Список
Период
Сортировка
От Grant Henderson
Тема Re: PHP and POSTGRES under windows
Дата
Msg-id 31EA81C61A3D014F8D6933864F32C604049CAC@server1.fusion-advertising.co.uk
обсуждение исходный текст
Ответ на PHP and POSTGRES under windows  (Raymond Chua Sing <mondi0924@yahoo.com>)
Список pgsql-php
We use this at work

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

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

-----Original Message-----
From: Raymond Chua Sing [mailto:mondi0924@yahoo.com]
Sent: 15 February 2003 05:42
To: pgsql-php@postgresql.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
"<?php
   // 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.


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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


В списке pgsql-php по дате отправления:

Предыдущее
От: Raymond Chua Sing
Дата:
Сообщение: PHP and POSTGRES under windows
Следующее
От: angelo.rigo@globo.com
Дата:
Сообщение: tcp connections