From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
To: | luiz(at)supersoft(dot)com(dot)br |
Cc: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Re: How to connect using pg_connect function from php3 ? |
Date: | 2000-04-27 01:20:41 |
Message-ID: | 20000427102041J.t-ishii@sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> Hello list!!!
> I´ve installed the postgresql 6.5.2-2cl.i386.rpm, the postgresql-devel, the
> postgresql-client and postgresql-lib. After, I created the user postmaster
> and the user nobody.
> I did a php3 script using the next line:
> $conn = pg_connect("localhost", "5432", "", "", "ss"),
> but didn´t get to do it work and I had the next warning:
> Warning: Unable to connect to PostgresSQL server: connectDB() -- connect()
> failed:
> Is the postmaster running (with -i) at 'localhost' and accepting connections
> on TCP/IP port '5432'? in
> /home/httpd/html/postgresql/multi.php3 on line 14
>
> Does anybody know how can I do it?
> Do I need to change any name of the last parameters that I am using? Do I
> need to add others?
>
> If somebody could help me...thanks!!!
You need to tweak pg_hba.conf. However if you just want to connect
local PostgreSQL server at 5432 port with the Unix domain socket,
$conn = pg_connect("", "", "ss");
would be enough, for the rather newer PHP (you didn't tell what
version of PHP you are using, though).
--
Tatsuo Ishii
From | Date | Subject | |
---|---|---|---|
Next Message | Ed Loehr | 2000-04-27 03:05:56 | Re: Revisited: Transactions, insert unique. |
Previous Message | Craig Orsinger | 2000-04-27 01:00:14 | Re: Where can I get free ODBC drivers for postgres? |