Configuring PHP 5.2.0 with Postgres 8.1.3 (no source)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm trying to configure PHP 5.2.0 with support for Postgres
8.1.3. Postgres was installed with FC5 without source. PHP's configure
needs source. When I run configure:

    configure: error: Cannot find libpq-fe.h. Please specify  
    correct PostgreSQL installation path

I tried downloading Postgres source and modifying PHPs configure to
point to it, and that worked. But then compilation failed, e.g.

    In file included from /home/jao/php-5.2.0/ext/pgsql/php_pgsql.h:32,
                 from /home/jao/php-5.2.0/ext/pgsql/pgsql.c:45:
         error: postgres_ext.h: No such file or directory
    In file included from /home/jao/php-5.2.0/ext/pgsql/php_pgsql.h:32,
                 from /home/jao/php-5.2.0/ext/pgsql/pgsql.c:45:
         error: expected ';', ',' or ')' before '*' token

Then I thought I'd uninstall the postgres RPMs and build postgres from
scratch, but there are dependencies on postgres: is needed by (installed) apr-util-1.2.2-4.2.i386 is needed by (installed) dovecot-1.0-0.beta2.7.i386 is needed by (installed) perl-DBD-Pg-1.43-2.2.2.i386

And I really don't want to unravel my entire set of RPMs.

So I have two questions:

1) Does PHP 5.2.0 support Postgres 8.x? The compilation errors, and
some of the postgres paths in the configure file suggest that it might

2) How can I get PHP configured to support postgres?

Jack Orenstein

Re: Configuring PHP 5.2.0 with Postgres 8.1.3 (no source)

On Sun, 03 Dec 2006 01:57:10 -0500, Jack Orenstein wrote:
Quoted text here. Click to load it

It does.

Install the postgresql-devel RPM, run "make clean" in your PHP source,
then ./configure and make again.


Adam Harvey

To e-mail: don't make an example out of me!

Site Timeline