Configuring PHP 5.2.0 with Postgres 8.1.3 (no source)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack Orenstein

    Configuring PHP 5.2.0 with Postgres 8.1.3 (no source)

    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:
    /usr/local/src/postgresql-8.1.4/src/interfaces/libpq/libpq-fe.h:29:26:
    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:
    /usr/local/src/postgresql-8.1.4/src/interfaces/libpq/libpq-fe.h:317:
    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:

    libpq.so.4 is needed by (installed) apr-util-1.2.2-4.2.i386
    libpq.so.4 is needed by (installed) dovecot-1.0-0.beta2.7.i386
    libpq.so.4 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
    not.

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


    Jack Orenstein

  • Adam Harvey

    #2
    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:
    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
    not.
    It does.
    2) How can I get PHP configured to support postgres?
    Install the postgresql-devel RPM, run "make clean" in your PHP source,
    then ./configure and make again.

    Adam

    --
    Adam Harvey

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

    Comment

    Working...