I've just re-installed XAMPP, and when I try to start my Apache server in the XAMPP Control Panel, I now get the following errors:
16:50:25 [Apache] Status change detected: running
16:50:26 [Apache] Status change detected: stopped
16:50:26 [Apache] Error: Apache shutdown unexpectedly.
16:50:26 [Apache] This may be due to a blocked port, missing dependencies,
16:50:26 [Apache] improper privileges, a crash, or a shutdown by another method.
16:50:26 [Apache] Press the Logs button to view error logs and check
16:50:26 [Apache] the Windows Event Viewer for more clues
16:50:26 [Apache] If you need more help, copy and post this
16:50:26 [Apache] entire log window on the forums
How do I solve this?
I had the same issue, and it turns out I forgot to run
setup_xampp.bat
(portable version).I had the same problem sometime back. I had a old laptop, on which almost all the ports were either blocked or were malfunctioning. This is how I did it.
Open the XAMPP control panel.
Click on Config
Then, go into Apache httpd.conf file. Open it with a text editor.
Search for "80" (Do Ctrl + F and find all of them. Replace it with 8080 or 4040 or 4000).
Save the file. And restart XAMPP.
It worked well for me, and I hope it helps you too.
Make at first sure your
\xampp
folder is in the root! This is important as the path is relative.Then make sure you run the
xampp_control.exe
with admin rights.Then change the files below to avoid issues with blocked port 80.
In
\xampp\xampp-control.ini
it should be set:Find
\xampp\apache\conf\httpd.conf
and set:Find
\xampp\apache\conf\extra\httpd-ssl.conf
and set:Then end all services and restart
xampp-control.exe
with admin rights. It should run!The Apache server by default runs on ports 80, 443. Your problem is one or both of the two ports are busy. Usually Skype or VMware Workstation use these two ports. So, make sure that they're not running. The best way to make sure the ports are free on windows is :
One thing you can do is to stop the services on port 80 by issuing
in a cmd. You'll be asked if you're sure you want to stop those services. I found out that I had a few services I wasn't using and disabled them.
To see who else is using port 80 type in a cmd
I'm assuming you want to run Apache on port 80. If this is the case and you want to keep the conflicting services you will need to associate them to a new port.
If the problem is not a busy port you can also try the following: select "show debug information" in the XAMPP config panel. When starting Apache you'll be shown something like "Executing "c:\xampp\apache\bin\httpd.exe". If you run that
in a cmd you will get some more information (I once for instance had some issue with my httpd.conf file).
Related: How do I free my port 80 on localhost Windows? and Apache won't run in xampp
This happend due to default port 80 is blocked for Apache. You need to change the port or make the port accesible.
Go to your Apache configuration (httpd.conf) file in the Apache installation.
Find these lines:
#
Listen 192.168.1.2:80
Listen 80
#
Change as below
Listen 192.168.1.2:8081
Listen 8081
Now when you access localhost you have to add the port explicitily as http://localhost:8081/...