Accessing PostgreSQL through Apache and PHP4 on Linux - Mailing list pgsql-general

From Holt, Jack C.
Subject Accessing PostgreSQL through Apache and PHP4 on Linux
Date
Msg-id 5699C9C65589D111917B00805FBBE4D801865F57@US-CPE.mail.saic.com
Whole thread Raw
Responses Re: Accessing PostgreSQL through Apache and PHP4 on  (Keary Suska <hierophant@pcisys.net>)
Re: Accessing PostgreSQL through Apache and PHP4 on Linux  (Andrew Gould <andrewgould@yahoo.com>)
Re: Accessing PostgreSQL through Apache and PHP4 on Linux  (teg@redhat.com (Trond Eivind Glomsrød))
List pgsql-general

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;

  }

?>

pgsql-general by date:

Previous
From: "Mihai Gheorghiu"
Date:
Subject: Please help
Next
From: Adam Haberlach
Date:
Subject: Re: python Backend message type 0x44 arrived while idle