Re: Accessing PostgreSQL through Apache and PHP4 on

From: Keary Suska <hierophant(at)pcisys(dot)net>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Accessing PostgreSQL through Apache and PHP4 on
Date: 2001-10-18 17:43:43
Message-ID: B7F470EF.4D35%hierophant@pcisys.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chances are, ld can't find libpq.so. Try adding the location of libpq.so
(usually /usr/lib/pgsql or /usr/local/lib/pgsql, but you can use whereis to
find out exactly where) to /etc/ld.so.conf, then run ldconfig. If it is an
ld problem, that should fix it.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"

From: "Holt, Jack C." <JACK(dot)C(dot)HOLT(at)saic(dot)com>
Date: Thu, 18 Oct 2001 07:55:42 -0700
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] Accessing PostgreSQL through Apache and PHP4 on Linux

I am running PostgreSQL 7.1.3, RedHat 7.1 (kernel 2.4.2-2), and
PHP/4.0.4pl1. When I try to run a PHP page found below I get an error that
says:

Fatal error: Call to undefined function: pg_connect() in
/var/www/html/psolver.php on line 10

Additionally, even though pgsql.so IS in /usr/lib/php4 (and php.ini tells
PHP to look there for extensions), I get the following error on the call to
dl().

Warning: Unable to load dynamic library '/usr/lib/php4/pgsql.so' - libpq.so:
cannot load shared object file: No such file or directory in
/var/www/html/psolver.php on line 7

Code snippet:

----------------------------------------------------------------------------
-------------------

<?

dl("pgsql.so");

//connect to database

$conn = pg_connect("","","","psolver");

if(!$conn) {

print("Couldn't connect to psolver");

exit;

}

?>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2001-10-18 17:44:57 Re: To Postgres Devs : Wouldn't changing the select limit
Previous Message Holt, Jack C. 2001-10-18 17:05:03 Re: TEXT field's length limit in PostgreSQL