So I was trying to set up Apache on Leopard for my laptop, then I realized that Apple has already installed Apache 2.2 in OS X. You can activate the Apache server by turning on Preference>Sharing>Web Sharing. Then I thought Apple might just have set up everything I needed already, and all I needed was AMP(Apache, MySQL and PHP). Well, not really. It turned out that PHP 5 was installed but for some reason, disabled. That’s like selling you a house but forgot to give you the key.

And I don’t get why.

Actually the only reason I can think of is iWeb, which is PHP-free. A simple Drag-and-save will get you a nice html page uploaded in your /user/Sites/ folder.
So I guess Apple is suggesting normal user to forget PHP and simply use iWeb to publish their sites. That’s kind of lame and unnecessary, but again, I can easily be wrong.
And in case you are wondering how to activate PHP in leopard, there’s an all-in-one package that’s going handle all the hassles activating PHP. It will also set up phpMyAdmin for you. The download link is here. It seems that there was also some way to manually activate PHP, now though that way no longer work.

I tried MAMP and it worked without problem on Leopard, and is definitely worth considering if you don’t want to waste too much mess with terminal commands. To make it work copy the downloaded MAMP folder to Applications, and then double-click the MAMP icon inside the MAMP folder. I suggest that you select Preferences > Ports, and click “Set to default Apache and MySQL ports”. If you do this, it’s important not to switch on Web Sharing in System Preferences. You must also close down any existing MySQL server. It’s also important to realize that the Apache and MySQL versions installed by MAMP are completely independent. The site root and MySQL data store are in different locations. Any databases created in a previous installation of MySQL must be exported, and reimported into the MAMP version of MySQL. The need to move things around detracts from the attraction of MAMP if you already have several databases stored in an existing installation of MySQL.

P.S. Quote from the site of MAMP.

Will MAMP work if the MAMP folder is not located in the Applications directory?
No. In order to work properly the MAMP folder has to be located in the Applications folder.



⊕ Related Posts

  • Disable shadow in screen window captures

  • Media Temple introducing Xserver-Virtual

  • What will Mac OS X 10.6 be named?

  • Icon level quick look in Snow Leopard


  • ⊕ Article Tags → | |

    One Response to “Why is PHP disabled by default in Leopard?”

    1. leopard s go to folder commands on July 10th, 2008 3:37 am

      [...] [...]

    Leave a Reply