This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: PHP for Cygwin
- From: Lloeki <lloeki at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 14 May 2006 00:34:09 +0200
- Subject: Re: PHP for Cygwin
- References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAlHG5AM/MnEOuR6C3tkYdTMKAAAAQAAAAF3zUc3n9Nk2uSpohprrVHQEAAAAA@videotron.ca> <4464D621.1A6ACBC6@dessent.net>
Getting PHP to build under Cygwin is NOT trivial;
While not strictly trivial, it's not hard at all. It required me no
patches or whatever. That is, if you keep your track on building
static stuff (CGI/FCGI, CLI, static in apache or the likes, but not
apxs/apxs2, .SO and the likes). I compiled it numerous times
successfully. Just install the right libs/packages and it will compile
fine.
for reference, here's roughly my configure for php 5.1.2 (wrapped in a
build script)
./configure \
--prefix=/opt/php \
--disable-ipv6 --with-zlib --enable-bcmath \
--enable-calendar --disable-dom --enable-exif --enable-ftp --wi$
--with-gettext --enable-mbstring \
--with-mysql=/opt/mysql --enable-pcntl \
--with-readline --without-pear \
--enable-fastcgi
then make && make install
then I just do this, for convenience:
cp sapi/cli/php.exe /opt/php/bin/php_cli.exe
ln -sf /opt/php/bin/php_cli.exe /usr/bin/php
cp php.ini-dist /etc/php.ini.default
if [ -e /etc/php.ini ]; then
echo "/etc/php.ini preserved"
else
cp /etc/php.ini.default /etc/php.ini
fi
ln -sf /etc/php.ini /opt/php/lib/php.ini
that's all. cli+cgi/fcgi on one run.
Lloeki