| From: | "Holt, Jack C(dot)" <JACK(dot)C(dot)HOLT(at)saic(dot)com> |
|---|---|
| To: | "'Mitch Vincent'" <mvincent(at)cablespeed(dot)com> |
| Cc: | "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Accessing PostgreSQL through Apache and PHP4 on Linux |
| Date: | 2001-10-18 19:06:00 |
| Message-ID: | 5699C9C65589D111917B00805FBBE4D801865F5B@US-CPE.mail.saic.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thanx. I'll do that.
-----Original Message-----
From: Mitch Vincent [mailto:mvincent(at)cablespeed(dot)com]
Sent: Thursday, October 18, 2001 10:32 AM
To: Holt, Jack C.
Subject: Re: [GENERAL] Accessing PostgreSQL through Apache and PHP4
on Linux
You didn't compile PHP with PostgreSQL support.
Recompile and add --with-pgsql to the configure line.
----- Original Message -----
From: "Holt, Jack C." <JACK(dot)C(dot)HOLT(at)saic(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Thursday, October 18, 2001 10:55 AM
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;
> }
> ?>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2001-10-18 19:11:43 | Re: can't create a database |
| Previous Message | Tom Lane | 2001-10-18 18:59:09 | Re: FTI Queries and Explain (long) |