...begins in wonder


navigation
home
github
email
about
code, poetry, philosophy, folly (Andrew Kuklewicz)

Installing Apache 2 and PHP 5 on Mac OS X

04 Mar 2007

Long ago I installed apache 2 instead of the lame-o version of apache that comes with OS X so I could use it to test rails configurations. Lately, I have been doing more work with Drupal (e.g. Public Radio Talent Quest), and messing with WordPress, so I wanted to run them locally to make my development much easier.

Also, I should mention, I try to avoid installing anything using fink or mac ports. Not because there is anything wrong with them per se, but I like control over what I install and where it goes, and as 9 times out of 10 I am going to be installing the same thing on at least 1 other OS, I want to do it from scratch. I am probably insane.

When I went to search for some easy instructions for installing php5 and apache2, best thing I could find was here. Wasn't bad, just change the instructions to prefix under "/usr/local/", and all went well.

Then I hit the PHP5 make, and it died, the error turns out to be pretty well known, and is related to PHP5 only compiling against MySql 4, whereas I live in this century and run MySql 5. Apparently there is a bug report for this. A quick install of mysql 4 from the tar.gz package, and updating the softlink for /usr/local/mysql, and everything compiled. Flip the soft link back to MySql 5, and so far everything runs fine.

So once again, with a bit more work, compiling from src triumphs!