From: | Charles Tassell <ctassell(at)isn(dot)net> |
---|---|
To: | John Tsombakos <johnts(at)ziplink(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trying to use PGSql with PHP |
Date: | 2000-10-08 22:12:08 |
Message-ID: | 4.3.2.7.2.20001008190852.04c44100@mailer.isn.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
The PHP RPM you installed wasn't built with PostGres support, and you can't
add it in without recompiling PHP. I'd grab the source for PHP (probably
version 4.02, I've been playing with it and it seems pretty stable) and
recompile it yourself via the instructions. It should just be a matter of:
./configure --with=pgsql=/usr/local/pgsql
--with-apxs=/usr/local/apache/bin/apxs --without-mysql
make
make install
but you can read the INSTALL file and the output from ./configure --help
for more details.
At 03:26 PM 10/8/00, Adam Haberlach wrote:
>On Sun, Oct 08, 2000 at 12:07:00PM -0400, John Tsombakos wrote:
> > on 10/8/00 2:56 AM, Frank Joerdens at frank(at)joerdens(dot)de wrote:
> >
> > No, I installed PostgreSQL and PHP with the RPM's, and I believe Apache was
> > already installed when I installed Redhat.
> >
> > Please note that PHP _does_ work. I can use PHP commands and it works fine.
> > It's just when I try to use the PostgreSQL commands, I get an error.
> >
> > For example, if I do something like:
> >
> > <?php
> > $connection=ph_connect("dbname=testdb")
> > ?>
> >
> > I get an error: "Fatal error: Call to unsupported or undefined function
> > pg_connect in /home/httpd/html/mypage.php on line 10"
> >
> > So, PHP works, Apache works, PSQL works by itself, it's just PHP and PSql
> > don't work and I can't get what I assume is the "missing link"
> > (php-pgsql-3.0.15-2.rpm) to install.
>
>...I don't like Red Hat for this reason--it usually doesn't give you much
>information about problems...
>
>For a production machine, I typically build and install my entire
>"mission-critical" chain of apps. Postgres, PHP, Apache, etc. This helps
>avoid a few problems: Red Hat may suddenly upgrade to a newly incompatible
>version, or may just change a configuration.
>
>At a guess, I would say that you are probably missing an .rpm for the
>postgres-client or pgsql-client, but that is based on my view dealings with
>Red Hat.
>
>--
>Adam Haberlach | A billion hours ago, human life appeared on
>adam(at)newsnipple(dot)com | earth. A billion minutes ago, Christianity
>http://www.newsnipple.com | emerged. A billion Coca-Colas ago was
>'88 EX500 | yesterday morning. -1996 Coca-Cola Ann. Rpt.
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Tassell | 2000-10-08 22:18:18 | Re: SV: Postmaster startup problems |
Previous Message | Peter Eisentraut | 2000-10-08 20:29:20 | Re: snapshot: dot or dash? |