469,275 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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

Dec 3 '06 #1
1 3562
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!

Dec 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Adam Kempa | last post: by
2 posts views Thread by Maniek | last post: by
3 posts views Thread by Darkcamel | last post: by
1 post views Thread by rada.lambretha | last post: by
reply views Thread by rski | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.