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/…
  • 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 is not compatible to apache 1.3? that’s just pure WTF. Or maybe… There’s different 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:

AcceptMutex flock

Done. What else you got punk!?! Seems like I managed to silenced Apache2 once and for all.

Victory, is mine…..


§ 3 Responses to Battle against LAMP (2): LAMP stack is…

  • jshacker says:

    Thanks for this tip! It just solved my problem.

  • Steph says:

    THANK YOU!!!

    I just spent 2-3 hours trying to figure out what I was doing wrong. Finally I came across your post. “AcceptMutex flock” resolved the issue in a minute. I can’t imagine how much longer it would have taken me to figure it out. Of course it’s only on the Mac OS!

    How did you ever figure that one out?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Battle against LAMP (2): LAMP stack is… at RAPD.


%d bloggers like this: