Обсуждение: pg_connect()

Поиск
Список
Период
Сортировка

pg_connect()

От
"Johann Thoyer"
Дата:
Hi everybody,

Excuse me for my bad english...

I've installed Red hat Linux 8.0, and php 4.2.2, apache 2.0.40 and
postgresql are installed automatically.

Apache and php runs very well (i created a file "test.php" with the
instruction phpinfo() and the information appears very well when i load my
page in my browser, in particular i see the configure command of php
and --with-apxs --with-pgsql=shared take part of it).

In an other php file, i try to connect a postgres database with the command
pg_connect.
And it appears in my browser this error message:
Fatal error: Call to undefined function: pg_connect() ...

the file httpd.conf contents:
LoadModule php4_module modules/libphp4.so

the file php.ini contents:
pgsql.allow_persistent= On

what should i do?

Thanks for any help

Johann



Re: pg_connect()

От
Alvaro Herrera
Дата:
On Fri, May 23, 2003 at 05:09:32PM +0200, Johann Thoyer wrote:

> Apache and php runs very well (i created a file "test.php" with the
> instruction phpinfo() and the information appears very well when i load my
> page in my browser, in particular i see the configure command of php
> and --with-apxs --with-pgsql=shared take part of it).
>
> In an other php file, i try to connect a postgres database with the command
> pg_connect.
> And it appears in my browser this error message:
> Fatal error: Call to undefined function: pg_connect() ...

You are probably missing one line in php.ini:
extension = pgsql.so

_or_ it's failing to load that shared library for some reason.  Look in
Apache's error_log, maybe there's something there.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Como puedes confiar en algo que pagas y que no ves,
y no confiar en algo que te dan y te lo muestran?" (German Poo)