Getting to PHP 5

10.3.9 – no help beyond 4.3.11 from Marc Liyanage.

Apple’s 4.4 is of no help – no GD support, missing other things – PEAR, XML things, etc.

How do I make a compatible build?

Start with Apple’s configure command (use phpinfo() on a standard installation). It *will* screw up your system files nicely, so make sure you know what each of the files and directories means! I didn’t. I have an interesting mix of system/local files now.

Add extensions as needed. Test ./configure each time, and you might as well re-build each time.

Decide where to get libraries. I finally decided to use darwinports for the non-Apple standards. Look out for X11 when not installed!!!!

Use the built-in GD ‘–with-gd’ – no path. darwinports gd has issues (won’t build).

I wound up with this

configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –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=/opt/local –with-config-file-path=/etc –sysconfdir=/private/etc –with-pear –with-mysql=/usr/local/mysql –with-openssl=/usr –with-gd –with-png=/opt/local –with-jpeg=/opt/local –with-expat=/opt/local –with-gettext=/opt/local –with-dom=/opt/local –with-dom-xslt=/opt/local –with-xslt-sablot=/opt/local –enable-xslt –with-xmlrpc –enable-wddx

I still need to figure out about IMAP support.

One Reply to “Getting to PHP 5”

Comments are closed.