Replacing Apple's PHP
Tue Aug 29, 2006 · 136 words

Needed to get gd2 support so thought why not as well update to latest 4.x PHP:

For JPG support, you'll ned libjpeg which won't compile directly. From the instructions here I found that you should simply:

> export MACOSX_DEPLOYMENT_TARGET=10.4

> ln -s `which glibtool` ./libtool

> cp /usr/share/libtool/config.sub .

> cp /usr/share/libtool/config.guess .

then just “configure –enable-shared” etc

LIBPNG

>curl -O http://surfnet.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.12.tar.gz

Don't bother with the no-config option, it can't find ZLIB.

>./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --with-apxs --with-ldap=/usr --with-kerberos=/usr --enable-cli --with-zlib-dir=/usr --enable-trans-sid --with-xml --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-dbx --enable-sockets --with-iodbc=/usr --with-curl=/usr --with-config-file-path=/etc --sysconfdir=/private/etc --with-mysql=/usr --with-mysql-sock=/var/mysql/mysql.sock --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-openssl=/usr

> make && sudo make install

And you should have PHP 4.4.4 with gdlib and OS X Server didn't notice a thing :P

Some stuff also from Apple, although IMHO Fink is overkill in this case:


back · essays · credits ·