Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Joel Porretta
Joel Porretta
5,079 Points

Problem with MAMP and Apache

Trying to start up MAMP, however I'm currently getting the following message: 'APACHE' needs open port '80' which is already being used by another service or application. Please configure 'APACHE' to use free port.

Has anyone else had this problem?

7 Answers

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Hi Joel,

Odds are you have another program running using that port, Skype perhaps?

Let me know if closing Skype(if you have it) works, or I'll help you with the next step!

Jonas

Joel Porretta
Joel Porretta
5,079 Points

I have tried Skype and a couple of other programs, however it still doesn't seem to be working. Will try a few other things. Any other advice would be great, thanks for helping.

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Alright Joel, try running this in cmd as an administrator:

FOR /F "tokens=5 delims= " %P IN ('netstat -a -n -o ^| findstr :80') DO TaskKill.exe /PID %P /T /F

More info can be found Here.

I hope this helps,

Jonas

Joel Porretta
Joel Porretta
5,079 Points

Good so far, now I've got it telling me that MySQL needs open port 3306. Do I run the same command over again or is there something else that can be done?

stjarnan
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
stjarnan
Front End Web Development Techdegree Graduate 56,488 Points

Okey Joel, let's try this:

netstat -b -p TCP

Then look for a line called localhost 3306. More information here. The application on that line is the one you need to shut down. We will soon have you up and running!

Good luck :)

Jonas

Joel Porretta
Joel Porretta
5,079 Points

Still not working. I've tried checking if there is another instance of MySQL running on the machine by using ps -ax | grep mysqld which hasn't seemed to work either.

Will keep looking for solutions :)

Joel Porretta
Joel Porretta
5,079 Points

Yeah, it was basically the same as the Apache error apart from the MySQL name and name of the port. Apologies for the late answer.