[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP3 and PostgreSql

You need to have libpq.so available to your run-time linker.

If you have PostgreSQL installed in the default /usr/local/pgsql/
location, just append "/usr/local/pgsql/lib/" to the end of your
/etc/ld.so.conf file and run ldconfig (you need to be root to do this).

If you cannot be root, then you can set the environment variable
LD_LIBRARY_PATH to include /usr/local/pgsql/lib/

In bash, this would be:

	export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib/

In the shell script that starts Apache with PHP (apachectl), you can
just create this environment variable there and things should also work
fine that way.

So there are two ways of completing this task.


> Y2KNET wrote:
> I am trying to run some php3 script on Postgresql and get the
> following error:
> Fatal error:  Call to unsupported and undefined function pg_connect()
> in /html/trans/view.php3 on line 5.
> I have psql running and setup the srm.conf httpd.conf files.
> This is a first time I am using php3. I will extremely appreciate, if
> someone
> can help me to find out the problem.
> Abu Umair

                                 Philip Jacob

Reply to: