Compiling PHP with Postgres support problem

Started by Jean-Christian Imbeaultabout 23 years ago4 messagesgeneral
Jump to latest
#1Jean-Christian Imbeault
jc@mega-bucks.co.jp

I am trying to compile PHP with the --with-pgsql flag but I get the
following error:

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

I do not have Postgres installed on this machine. The DB is on another
machine.

What do I need to do in order to get PHP to compile with Postgres
support? I am hoping I just need to copy some header file over and
somehow point PHP ./configure script to it?

I don't want to install Postgres on this machine at all if possible. I
don't even want to install it and then remove it ... if possible :)

Can anyone tell me:

1- Which files are needed
2- where to find the necessary files and where to put them
3- after PHP compilation can I remove the files or do they need to stay
on the machine?

Thanks,

Jc

#2snpe
snpe@snpe.co.yu
In reply to: Jean-Christian Imbeault (#1)
Re: Compiling PHP with Postgres support problem

You need pgsql source in any directory and set --with-pgsql=<pgsql_source>
You don't compile source, but when you execute php you need pgsql libraries, too

regards
Haris Peco

Show quoted text

On Tuesday 21 January 2003 09:28, Jean-Christian Imbeault wrote:

I am trying to compile PHP with the --with-pgsql flag but I get the
following error:

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

I do not have Postgres installed on this machine. The DB is on another
machine.

What do I need to do in order to get PHP to compile with Postgres
support? I am hoping I just need to copy some header file over and
somehow point PHP ./configure script to it?

I don't want to install Postgres on this machine at all if possible. I
don't even want to install it and then remove it ... if possible :)

Can anyone tell me:

1- Which files are needed
2- where to find the necessary files and where to put them
3- after PHP compilation can I remove the files or do they need to stay
on the machine?

Thanks,

Jc

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

#3Jean-Christian Imbeault
jc@mega-bucks.co.jp
In reply to: Jean-Christian Imbeault (#1)
Re: Compiling PHP with Postgres support problem

snpe wrote:

You need pgsql source in any directory and set --with-pgsql=<pgsql_source>
You don't compile source, but when you execute php you need pgsql libraries, too

Sorry for the late reply but I only just got around to trying your
suggestion out. For future readers of the ML archives ...

Using --with-pgsql=<pgsql_source> doesn't work. I get the following error:

"Please specific correct PostgreSQL installation path". So I guess PHP
is assuming PostgreSQL to be installed.

One work around I was able to use was to copy these files into
/usr/local/ (the default installation path):

psql/include/libpq-fe.h

That got PHP to ./configure without any errors but I haven't been able
to get it to compile yet. Don't know if the compilation problem is
related to pgsql or not yet though ... need to investigate more.

I think some .so files are also needed ...

Jc

Jc

#4snpe
snpe@snpe.co.yu
In reply to: Jean-Christian Imbeault (#3)
Re: Compiling PHP with Postgres support problem

On Monday 27 January 2003 05:24, Jean-Christian Imbeault wrote:

snpe wrote:

You need pgsql source in any directory and set
--with-pgsql=<pgsql_source> You don't compile source, but when you
execute php you need pgsql libraries, too

Sorry for the late reply but I only just got around to trying your
suggestion out. For future readers of the ML archives ...

Using --with-pgsql=<pgsql_source> doesn't work. I get the following error:

"Please specific correct PostgreSQL installation path". So I guess PHP
is assuming PostgreSQL to be installed.

One work around I was able to use was to copy these files into
/usr/local/ (the default installation path):

psql/include/libpq-fe.h

That got PHP to ./configure without any errors but I haven't been able
to get it to compile yet. Don't know if the compilation problem is
related to pgsql or not yet though ... need to investigate more.

I think some .so files are also needed ...

Correct.I'm sorry.
I had libraries in RH 8.0.

regards
Haris Peco