pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedPHP and POSTGRES under windows
3+ messages / 3 participants
[nested] [flat]
* PHP and POSTGRES under windows
@ 2003-02-15 05:41 Raymond Chua Sing <mondi0924@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: Raymond Chua Sing @ 2003-02-15 05:41 UTC (permalink / raw)
To: pgsql-php
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PHP and POSTGRES under windows
@ 2003-02-17 09:38 Grant Henderson <granth@fusion-advertising.co.uk>
0 siblings, 0 replies; 3+ messages in thread
From: Grant Henderson @ 2003-02-17 09:38 UTC (permalink / raw)
To: 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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: PHP and POSTGRES under windows
@ 2003-02-17 15:55 Frank Bax <fbax@sympatico.ca>
parent: Raymond Chua Sing <mondi0924@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Frank Bax @ 2003-02-17 15:55 UTC (permalink / raw)
To: pgsql-php
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
>"<?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.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-02-17 15:55 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-15 05:41 PHP and POSTGRES under windows Raymond Chua Sing <mondi0924@yahoo.com>
2003-02-17 15:55 ` Frank Bax <fbax@sympatico.ca>
2003-02-17 09:38 Re: PHP and POSTGRES under windows Grant Henderson <granth@fusion-advertising.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox