Installing PHP 4.4.7 on Mac OS X Server 10.4+ (TIGER)


After 2007-12-31 there will be no more releases of PHP 4.4. Please use the rest of this year to make your application suitable to run on PHP 5.

Whenever you compile from source code it is necessary to have Xcode installed. It's a free download from Apple Developer Connection.
The following installation is configured with the same commands as the Apple shipped module for TIGER.
To check what is your current php version via terminal: php -v

curl -O http://us2.php.net/distributions/php-4.4.7.tar.gz
gunzip php-4.4.7.tar.gz
tar -xvf php-4.4.7.tar

Create install script

cat > php4.Build
#! /bin/sh

./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-config-file-path=/etc \
--sysconfdir=/private/etc \
--with-mysql=/usr \
--with-mysql-sock=/var/mysql/mysql.sock

Do a "control C" to end the "cat >" process. That will create a file called php.Build in your home directory.

chmod 775 php4.Build
cd php-4.4.7
../php4.Build
make
sudo make install
sudo apachectl graceful restart 

PHP.INI (php pref file)

/etc/php.ini.default - If you need to use the pref file rename "php.ini.default" to "php.ini" and it should be available to you.