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

WordPress Local WordPress Development Local WordPress Development Installing a Local Web Server on a PC

Tracy Ward
Tracy Ward
136 Points

XAMP apache not starting but MySQL is.

12:08:58 PM [Apache] Problem detected! 12:08:58 PM [Apache] Port 80 in use by "Unable to open process" with PID 4! 12:08:58 PM [Apache] Apache WILL NOT start without the configured ports free! 12:08:58 PM [Apache] You need to uninstall/disable/reconfigure the blocking application 12:08:58 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port 12:08:58 PM [mysql] XAMPP MySQL is already running on port 3306 12:08:58 PM [main] Starting Check-Timer 12:08:58 PM [main] Control Panel Ready 12:09:05 PM [Apache] Problem detected! 12:09:05 PM [Apache] Port 80 in use by "Unable to open process" with PID 4! 12:09:05 PM [Apache] Apache WILL NOT start without the configured ports free! 12:09:05 PM [Apache] You need to uninstall/disable/reconfigure the blocking application 12:09:05 PM [Apache] or reconfigure Apache and the Control Panel to listen on a different port 12:09:05 PM [Apache] Attempting to start Apache app... 12:09:05 PM [Apache] Status change detected: running 12:09:12 PM [Apache] Status change detected: stopped 12:09:12 PM [Apache] Error: Apache shutdown unexpectedly. 12:09:12 PM [Apache] This may be due to a blocked port, missing dependencies, 12:09:12 PM [Apache] improper privileges, a crash, or a shutdown by another method. 12:09:12 PM [Apache] Press the Logs button to view error logs and check 12:09:12 PM [Apache] the Windows Event Viewer for more clues 12:09:12 PM [Apache] If you need more help, copy and post this 12:09:12 PM [Apache] entire log window on the forums

1 Answer

Konrad Traczyk
Konrad Traczyk
22,287 Points

Hello, at first You need to know that couple of things prevent running Apache on your Windows because port 80 is blocked by another application/s. Here's what I do when I have problems with this.

At first You need administrator privileges to do this.

  1. Open Windows PowerShell or Command Prompt in admin mode(right click windows icon in bottom left corner) then type "net stop http" and confirm, then run apache on port 80.
  2. Change Apache port to do this in XAMPP: Click config button, choose httpd.conf, find line "Listen 80", then change port for example to "Listen 81", now you can use your locals in browser address by typing "localhost:81/wp", assuming you have "wp" directory.

I prefer 1st method.

Optional: Also from my experience apache can make troubles when: Skype is running and UAC in windows is enabled(to disable this type 'uac' in windows search, but this will make your pc less secure so watch out).

Don't forget to place your project in "xampp\htdocs" directory.

Hope it helps.

Konrad.

Tracy Ward
Tracy Ward
136 Points

Thanks so much. I have this working now.