Making Mac OS/X 10.5 PHP Behave

This is not much – but it is what I need to to to make Mac OS/X 10.5 PHP behave and support ZIP files and zip_open() (Intel-only).

sh-3.2# cd /private/etc/apache2/
sh-3.2# vi httpd.conf
sh-3.2# cd /private/etc
sh-3.2# cp php.ini.default php.ini
; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613"
extension = zip.so
sh-3.2# cd /usr/lib/php/extensions/no-debug-non-zts-20060613
(See http://www.viames.it/mac-os-x.html for detail)
sh-3.2# curl -O http://www.viames.it/download/zip.so
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100 88232  100 88232    0     0  59887      0  0:00:01  0:00:01 --:--:--   99k
sh-3.2# chmod +x zip.so
sh-3.2# ls -l
total 352
-rwxr-xr-x  1 root  wheel  87880 May  8 00:10 phpcups.so
-rwxr-xr-x  1 root  wheel  88232 Jul  3 16:35 zip.so
sh-3.2# apachectl stop
sh-3.2# apachectl start

Also I need an htaccess that looks like this:

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

Perhaps in an upcoming version of Mac OS/X, the PHP will more of the common features installed out of the box. A good benchmark would be if the Mac OS/X PHP had enough extensions to run Moodle or Chisimba. In the meantime just use MAMP – after a while installing extensions gets tiring.