I have installed XAMPP (xampp-win32-1.8.2-0-VC9-installer.exe) on Windows 7 successfully. But unfortunately, the following error was found during running Apache from XAMPP Control Panel:
5:38:38 PM [Apache] Error: Apache shutdown unexpectedly.
5:38:38 PM [Apache] This may be due to a blocked port, missing dependencies,
5:38:38 PM [Apache] improper privileges, a crash, or a shutdown by another method.
5:38:38 PM [Apache] Press the Logs button to view error logs and check
5:38:38 PM [Apache] the Windows Event Viewer for more clues
5:38:38 PM [Apache] If you need more help, copy and post this
5:38:38 PM [Apache] entire log window on the forums
Check if you have Skype installed on your machine.
Login and go to Tools - Options - Advanced - Connection and uncheck the box which says use port 80
--
Check if Apache service is already installed by firing up services.msc from run command prompt.
How to delete a service from command prompt? sc delete “serviceName”
Remember serviceName should be replaced by exact name of the Apache service as shown is services list.
Check if IIS is running and taking up port 80. If so, disable it.
--
Check if AVP (Kaspersky) is running and taking up port 80. If so add httpd.exe as an exception to allowed programs.
--
Hope it helps.
Using XAMPP for laravel development currently.
I have skype installed on my desktop, which blocks port 80 and 443 (both of which Apache uses)
This fix worked for me:
1) Under C:\xampp\apache\conf\httpd.conf
, search for Listen 80
and change to Listen 81
2) Under C:\xampp\apache\conf\extra\httpd-ssl.conf
, search for Listen 443
and change to Listen 444
Accompanying Timmay's answer, You need to do two changes-
Listen 80 --> Listen 81 (near line 58)
ServerName localhost:80 --> ServerName localhost:81 (near line 218)
Use any method for which the server is working after that you can use this address to open the page on browser (if you've replaced the port 80 with 81 )
http://localhost:81/phpmyadmin/
For me it was because of vmware (services-it has about 2 or 3 different services),stop it and every thing works fine
Even if you've configured Apache to listen on another port, you will still get this error if another program is using the default SSL port 443.
What you also need to edit is the http-ssl.conf file and alter the line Listen 443 and change the port number there.
If You installed SQL Express or any .Net Server then you need to stop. open cmd in administrator mode and type this line ...
net stop Was
now start apache
For my case, I didn't have htdocs
folder in xampp folder. It seems that it requires htdocs
folder to run so you can create an empty htdocs
folder in the xampp
folder.
In my case the problem was that both port 80 and 443 were in use: Steps to use to fix it are :
80
and replace with 8080
443
and replace with 4430
.Now your localhost will be available as localhost:8080
I have installed VMWare Workstation. So, It was causing the error.
Services.msc and stopped the 'Workstation' Services.
This has solved my problems.
Thanks
1. Go in xampp/apache/conf/httpd.conf
and open it.
In the httpd.conf
file at line 176
Replace
ServerName localhost:80
with
ServerName localhost:81
It will work.
Or 2. Even if the above procedure doesn't work. Then in the same file (httpd.conf
) at line 45 replace
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80
with
#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81
The Best way to do so:
The other methods explained above will get you stuck at a lot of places Don't go for changing the port
2 Step Process
1) Open Command Prompt as Administrator
2) type net stop http
(If it says it doesn't identify the keyword, then it is only because your Environmental Variable's PATH doesn't contain path to Program Files/System32 you can search on how to do it )
press Y at every place it asks you to, don't worry you are not stopping any important process just some process which took your port. And that process will again take over your port once you are not working.
Salam,
You don't need to change port no.
only go to task manager & end task any other programs that are running.
and then can you START APACHE.......
Sincerely,
Probably you change configuration file in "httpd-ssl.conf"
<VirtualHost _default_:443>
DocumentRoot "D:/Server/xServer"
ServerName xyz.abc.com
SSLCertificateFile "conf/ssl.crt/xyz.crt"
SSLCertificateKeyFile "conf/ssl.key/sftaps.in.key"
</VirtualHost>
May be you change certificate name or something in Apache folder.
Go in xampp/apache/conf/httpd.conf and open it. Then just chang 2 lines
Listen 80
to
Listen 81
And
ServerName localhost:80
to
ServerName localhost:81
Then start using admin privileges.
As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.
As the port is not used by Skype, but by some other internal applications, I followed the below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80 And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080 Still from the httpd.conf file,
You should also do this in the same process Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443 And change 443 to 4433.
ServerName localhost:4433 Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
Had the same problem and none of the above solutions worked. So, by reading carefully the logs, I found this message :
10:55:42 [Apache] Port 443 in use by ""C:\Program Files (x86)\VMware\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 1908!
In my case, I had just to stop the VMWare service which was running automatically.
The key is to read carefully the message given by XAMPP Panel when started.
Hope this help!
XAMPP Control Panel under Windows does not always reflect what is actually going on, unless you start it by "Run as administrator".
There can be lots of methods to solve this problem, but here is simplest one:
GO to XAMPP-control and...
Run as administrator
That's all..
This is the Golden Point for any such Abnormality.
Concept behind the work
Actually all the services in Xampp need Ports dependency. What happens is, When there is no special powers given to xampp, it only look for some predefined ports to run those services. And, if in case, those ports are somehow already busy... eek! the service couldn't be started.
But if we give superpower to our Xampp-control (by running as administrator), it will somehow manage and for certainly on earth will run the services on the ports. And triumph! You made it.
Permanent tip for my dear Brother and Sisters
To do the efforts one and for all, follow these steps:
Now, every time you run the application, it will run with the Administrator status and You don't need to take care about the ports at all.
I also faced the same problem. And I found an easy and fast solution.
The only thing you need to do is to run XAMPP server as administrator everytime.
Run these commands in terminal and everything will work fine:
sudo /etc/init.d/apache2 stop
sudo /opt/lampp/lampp start
I have a solution. I had this problem and research a solution, but i did not succeed. So i downloaded a newer version of XAMPP and clicked on the option netstats within the program.
There he gave me a list of programs and the ports they used and so I looked and had no program using port 80
, but apache beyond 80
also uses port 443
... and there was a program called Pando Media Boster this door, I started the task manager and finished the process of pando Average boster. Hope it helped :).
If you face this issue directly after a complete new installation on Windows:
It seems like the setup program already starts the http.exe process and blocks the initial port 80 but does not reflect this state in the control panel.
To verify, just test for a running server in your browser. Type into your browser address bar:
localhost
If this displays the XAMPP dashboard, you're fine. Alternatively, check the Task Manager for a running 'Apache HTTP Server' (httpd.exe) process.
You could stop the apache process with the xampp_stop.exe in your xampp base folder. Then, the XAMPP control panel should work as expected.
i have found that similar issue on my system, and that was from skype installed before xampp installed. i got similar error. for fixing the error i followed these,
i wasn't need nothing to install or uninstall, and this worked for me in less then 1 minute.
cheers
Have you executed "setup_xampp.bat" script? It's inside XAMPP folder and it must be executed every time you change XAMPP folder.
Source: Stackoverflow.com