Backup your current httpd.conf
cd /private/etc/httpd
sudo cp httpd.conf httpd.conf.old
Revert httpd.conf
sudo cp httpd.conf.default httpd.conf
Go to Entropy Mac OS X PHP and download the PHP archive for Apache 1.3. Uncompress it with the terminal and launch the installer from the Finder.
PHP5 is now installed and running! However, your web applications may not work properly anymore. A few fixes follow.
This functionnality is used by some PHP frameworks like Code Igniter . It allows you to use this convenient syntax to print a value:
<?= $toto ?>
To activate it, replace in /usr/local/php5/lib/php.ini:
short_open_tag = Off
by
short_open_tag = On
Replace in /private/etc/httpd/httpd.conf
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None
by
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All