Battle against LAMP (2): LAMP stack is…
May 5, 2007 § 3 Comments
LAMP STACK indeed.
On Mac OS X:
- apache 1.3/php4/mysql4.1 are default. Piece of cake. No big deal.
- mysql5/apache2/php5 are giving me fits, but nothing I couldn’t handle. Piece of cake.
- How about apache 1.3/php5/mysql4.1? Suddenly the STACK becomes somewhat a lot more difficult to configure. (apache 1.3/php4/mysql5 gives about the same annoyance).
Why? Why is is so difficult to mashed old/new versions of LAMP? Some of the explanations I could come up with are:
- In OS X, default LAMP configurations are located in funky places such as /private/etc/… That’s not very default compared to debian Linux.
- /usr/sbin/apachectl is not symlink. Thus, finding the REAL apache 1.3 executable is not easy at all. Albeit finding httpd.conf was easy (Guess where? inside: /private/etc/…).
- Of course, just to make life more difficult, apache 1.3 modules have to be placed here: /usr/libexec/httpd/…
- Console.app is great, very useful. But it only keeps default logs. (e.g. apache 1.3 access_log located under /private/etc/…). If you want to see apache2 error log, create symlink that replace default log file.
Besides configuration, more griefs are coming almost immediately:
- Why libphp5.so is not compatible to apache 1.3? that’s just pure WTF. Or maybe… There’s different libphp5.so for different Apache version?
- Soon after, Apache2 gives me this error: LoadModule mod_rewrite is default, thus cannot be loaded.
Default my ASS, if I have to specify ./configure –enable-rewrite then it’s not default configuration. At least it was an easy fix, simply commented out LoadModule mod_rewrite.
As I thought I have won the war, WHAM!!!!
Permission denied: couldn't grab the accept mutex
What the… Apparently Apache 2 for Mac OS X doesn’t like listening to more than 1 port. Adding this on my httpd.conf fix the problem:
Done. What else you got punk!?! Seems like I managed to silenced Apache2 once and for all.
Victory, is mine…..