Activate PHP5 on Mac OS X Snow Leopard

I blog this, because it took me some time to figure that out and is so simple to fix.

I just bought a Mac Mini Server with Mac OS X Snow Leopard Server. There is a nice interface to configure apache2, mailserver and everything else. By default there is no php5 enabled.
If you look into the module list in the server admin interface, there is the php5_module. Just check the box, the server will perform a gracefully restart.

I just installed a little script with the following code in it.

After that I opened the site in the local webbrowser.

The result was:

Mhhh??? What went wrong?

The answer is quite simple. Mac OS X Server comes with NO php.ini and PHP comes with short_tags disabled by default.

So, just at a php.ini file or add to your script.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.