Re: How to connect using pg_connect function from php3 ?

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: How to connect using pg_connect function from php3 ?
Дата
Msg-id 20000427102041J.t-ishii@sra.co.jp
обсуждение исходный текст
Ответ на How to connect using pg_connect function from php3 ?  ("Luiz Antonio" <luiz@supersoft.com.br>)
Список 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

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

Предыдущее
От: "Michael S. Kelly"
Дата:
Сообщение: I'm just doin' the 7.0 RC1 install and have some input on the documentation.
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: Revisited: Transactions, insert unique.