Cygwin/PHP


Some notes on compiling PHP 4.3.9 for use with thttpd on Cygwin, based almost solely off base libraries (included with Cygwin).

After getting and unpacking the sources in sibling directories ming was compiled and installed as follows:

$ cd ming-0.2a
$ make
$ make install
$ make install-static

Then PHP was configured as follows:

$ ./configure \
--with-thttpd=../thttpd-2.21b/ \
--with-zlib \
--with-bz2 \
--with-curl \
--with-gdbm \
--with-flatfile \
--with-dom \
--with-dom-xslt \
--with-dom-exslt \
--with-ipv6 \
--with-openssl \
--with-zlib \
--enable-exif \
--enable-ftp \
--with-gd \
--with-jpeg \
--with-png \
--enable-gd-native-ttf \
--with-freetype-dir=`freetype-config --prefix` \
--with-ming=../ming-0.2a/ \
--with-tiff \
--enable-sockets \
--enable-pcntl \
--enable-posix \
--enable-cgi \
--enable-fastcgi

$ make; make install

thttpd is then compiled and installed with minimal patching (essentially casting the return value of the timezone macro to long and changing a few chown and chmod commands on the Makefile).

A typical config file is:

$ cat /etc/thttpd.conf
dir=/var/www/html
user=nobody
logfile=/var/log/thttpd.log
port=80