logo
Published on aidanf.net (http://www.aidanf.net)

Enabling php on Leopard

By aidan
Created 2008-02-05 15:09

Previous versions of OS X came with apache and php4 installed. To enable it you had to edit /etc/httpd/httpd.conf

This has changed in Leopard so if you’ve upgraded you need to re-enable php. The location of the apache config file has changed and the installed php module is now php5. The apache configuration is now stored in /etc/apache2/httpd.conf.

So to enable php on Leopard, uncomment the line

LoadModule php5_module        libexec/apache2/libphp5.so

in /etc/apache2/httpd.conf and restart Web Sharing from the System Preferences panel. A by-product of the move from php 4 to 5 is that some of the default options have changed. So you may need to set some of the options to get your application to work. The php.ini file used by this php module is /etc/php.ini

Edit The php version that ships with Leopard doesn’t include GD image support. So if you need that you need to recompile the php module [1] (or you could use Mamp [2]).


Source URL:
http://www.aidanf.net/blog/2008/02/05/enabling-php-leopard