简体   繁体   中英

XAMPP won't start apache

I need to set up a local php server and downloaded XAMPP version 3.2.1 for windows. The installation finished without error messages and the control panel starts just fine. MySQL runs without problems but apache won't start.

The error message says:

12:17:01 [Apache] Attempting to start Apache app...

12:17:01 [Apache] Status change detected: running

12:17:02 [Apache] Status change detected: stopped

12:17:02 [Apache] Error: Apache shutdown unexpectedly.

12:17:02 [Apache] This may be due to a blocked port, missing dependencies,

12:17:02 [Apache] improper privileges, a crash, or a shutdown by another method.

12:17:02 [Apache] Press the Logs button to view error logs and check

12:17:02 [Apache] the Windows Event Viewer for more clues

12:17:02 [Apache] If you need more help, copy and post this

12:17:02 [Apache] entire log window on the forums

I tried various ports, apache still doesn't start. I started the control panel as administrator - I am logged into the administrator account on this machine, but there's this extra button "start as administrator"- . It doesn't work.

Unfortunately the error logs are not created. The control panel complains that it couldn't find the appropriate files, should they be created ? I clicked yes and tried to start apache again. Same error message, now the error logs are found but they are still empty.

I searched for similar problems and found this question: Apache in XAMPP won't start

The accepted answer recommends to close the windows services "WebClient" and "Web Deployment Agent Service". I've disabled "WebClient" but "Web Deployment Agent Service" is not installed. Sounds like VisualStudio which I don't have on this machine.

My guess is that my apache installation is not sane. Probably misses some dependencies. How can I check this ?

UPDATE:

It seems that although I changed the configuration files, apache still tried to run on port 80. And this port was indeed blocked by Skype. After closing skype, apache ran fine. And it was available on localhost:80 despite the fact that I definitely specified another port in the config file. @steven if you made your comment into an answer, i would accept it.

There are several reason that can cause this issue.

  1. Skype :- Skype run on port 80 and 443 which can be a reason that block port 80 and 443 for Apache. you don't need to uninstall Skype. you can use following step if you installed Skype in your Machine.

    • Quit Skype before running Apache so if Skype can release port 80 and 433.

    • Go to Skype Tools-> options -> Advanced -> Connection and unchecked port 80 after this you need to restart your skype and try to run the xampp now it'll not throw any issue as port 80 and 443 is free to use


  1. IIS Server :- If your Machine have IIS Server enable so this is also a problem for you because IIS server also use port 80 and 443.

    • Go to start Menu type Internet Information Services select this and stop it's service which will release port 80 and 443.

I got the same problem, but I finally solved it.

  1. Have you checked your firewall?
  2. Are any XAMPP applications and services excepted?
  3. Then, make sure Skype is uninstalled or blocked. This application uses the ports 80 and 443.

For me, Skype wasn't the problem, but iTunes! I figured out that iTunes uses the ports 80 and 443 as well. If it still doesn't help, try installing Apache manually.

open your command prompt (run as administrator) and write the following code and hit enter

net stop w3svc

and then open your xampp and run apache server

if you want to start your w3svc then execute this code net start w3svc

NOTE : stopping w3svc won't lead to any problems

NOTE : Don't forget to run cmd as administrator

After checking my config files, running "net stop http" in the command line, as well as spending about 30 minutes trying to download a version of Skype that is no longer supported in order to release my ports...

What worked for me is that I needed to create an SSL certificate. I found this under xampp/apache/conf/ssl.cert directory. (Make sure to save the certificate in the "Trusted Root Certification Authorities" store when prompted). Once going through that prompt, and successfully creating the certificate. Apache began running again like normal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM