This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PHP Apache module with PostgreSQL support


> if you want PostgreSQL support build in php you will have to tell
> php's configure script corresponding directives and afterwards tell
> mkdll.sh some linker flags to the corresponding libraries to resolve
> the references.

Thanks Stipe. I tried to build php as DSO/static and with/without pgsql.
Every trial failed at a certain point.

Is it necessary to have apache/postgresql sources accessible to build a php
DSO?

I think the apache sources are required only for statically linked modules.
However, the sources are available in:
/usr/src/apache_1.3.24-5
/usr/src/postgresql-7.2.1-2
/usr/src/php-4.2.0-1

The correct steps to build a php DSO with pgsql support should be as follows
(?):
  tar xjvf apache-php-4.2.0-1-src.tar.bz2			[1]
  patch -p0 < php-X-Y/CYGWIN-PATCHES/php-4.2.0-1.patch	[2]
  cd php-4.2.0-1							[3]
  autoconf								[4]
  ./configure --with-apxs --without-mysql --with-pgsql	[5]
  make								[6]
  cd sapi/apache/.libs						[7]
  ../../../CYGIN-PATCHES/mkdll.sh libsapi.la \
    -L ../../../.libs -lphp4 \
    /usr/bin/cyghttpd.dll					[8]
  mv cygsapi.dll libphp4.dll					[9]
  /usr/sbin/apxs -i -a -n php4 libphp4.dll  		[10]

Step [5] breaks with:
...
checking for PostgreSQL support... yes
configure: error: Cannot find libpq.so. Please specify correct PostgreSQL
installation path

Of course there are no *.so files available under Cygwin. Which path for
pgsql should I specify (installation (/usr/share/postgresql) or source or
other (/usr/include/postgresql or /lib/postgresql) path)?
Is it necessary to install pgsql from source where the install directory
would be /usr/local/pgsql?

The process terminates with step [8] if no pgsql support is specified
(./configure --with-apxs --without-mysql) after a list of "undefined
reference to..." messages with following error:
collect2: ld returned 1 exit status

Is there any other flag required for mkdll.sh than the above (step [8])? I
guess for pgsql!?

Andreas



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]