Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache not starting in MAMP (but MySQL working) in OSX

Tags:

macos

apache

mamp

I've had MAMP working for a few months and recently installed PostgreSQL. It recommended installing Apache as well, which I did to make sure PostgreSQL worked. I then uninstalled PostgreSQL and the apache build and tried to restart MAMP. It fired up the MySQL database (green light) but Apache didn't start. I uninstalled and reinstalled MAMP only to face the same problem.

Apache doesn't seem to be logging any errors in the MAMP folder, so without any errors to report I'm struggling with where to begin fixing it. I'm hoping its to do with the fact that I installed another version (and deleted it) that has caused the problem but I'm too inexperienced to know what I've done.

Where might I find any errors if not in the MAMP folder? Not in:

  • /Applications/MAMP/Library/logs
  • /Applications/MAMP/bin/logs
like image 598
Djave Avatar asked Dec 13 '12 23:12

Djave


People also ask

How do I start Apache in MAMP?

To do this, navigate to MAMP > Preferences in the MAMP application menu: You can change the port used by Apache to avoid conflicts with Skype and other applications. Click on Ports at the top of the Preferences window, enter a new port for Apache, and click on OK to save the change.

What to do if MAMP is not starting?

The issue is usually due to another MySQL service running on the same port. The easiest solution is to kill all MySQL processes and restart MAMP. On macOS, you can do this using the Activity Monitor, which you'll find in the Utilities folder on your computer.

How do I start MAMP server on Mac?

Step 1: Visit https://www.mamp.info/ and select Downloads in the top right corner of the website. Step 2: Select the MAMP & MAMP PRO button below the Apple Logo to begin downloading MAMP for the Macintosh Operating System. Step 3: Chrome will begin downloading MAMP.


Video Answer


3 Answers

Stoping the Apache solved this issue for me, using the command-line:

sudo apachectl stop
like image 54
Qullbrune Avatar answered Oct 25 '22 11:10

Qullbrune


For those of you upgrading to Yosemite there seems to be a bug which I don't really understand but its easily fixed as posted on their twitter account.

Workaround for the 10.10 Preview 5 bug: Rename the file “envvars” located in '/Applications/MAMP/Library/bin' into “_envvars” (@mamp_en)

like image 41
Jose Torres Avatar answered Oct 25 '22 09:10

Jose Torres


I had a similar problem and could solve it by starting on the command line the apachectl included in MAMP:

$ /Applications/MAMP/Library/bin/apachectl start

which would yield

Syntax error on line 427 of /Applications/MAMP/conf/apache/httpd.conf:
Invalid command '\xef\xbf\xbc#AllowOverride', perhaps misspelled or defined by a module not included in the server configuration

This error message was nowhere else, not in any log file or system console. (Turns out I had copied a line from a documentation file which had copied some special characters that were not intended for my system - how easy to find is that!)

This is for MAMP 2.0.1, maybe it's handled better in newer versions.

like image 20
DonCristobal Avatar answered Oct 25 '22 11:10

DonCristobal