Skip to main content

Enable Apache in XAMPP at Windows 7

1.
Problem detected!
Port 80 in use by "Unable to open process" with PID 4!
Apache WILL NOT start without the configured ports free!
You need to uninstall/disable/reconfigure the blocking application
or reconfigure Apache and the Control Panel to listen on a different port


2.
Error: Apache shutdown unexpectedly.
This may be due to a blocked port, missing dependencies,
improper privileges, a crash, or a shutdown by another method.
Press the Logs button to view error logs and check
the Windows Event Viewer for more clues
If you need more help, copy and post this
entire log window on the forums


If you have come across either one of errors, mostly issue could be port 80 is used by another service or combination of services or a tool.

If you are not a developer, you don’t have development software installed and Skype is installed; first go to  “Tools-> Option -> advanced -> connection” and check port 80 is used there?

For developer it’s quite impressive (if the machine contains developer software).
In command prompt go to the xampp installed location.

D:\xampp>apache_start.bat
It should be an error like this
“Diese Eingabeforderung nicht waehrend des Running beenden
Bitte erst bei einem gewollten Shutdown schliessen
Please close this command only for Shutdown
Apache 2 is starting ...
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions.  : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions.  : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs

Apache konnte nicht gestartet werden
Apache could not be started
Press any key to continue . . .”


Now we need to find what happened to the port: 80
For that we can use either windows tools or some utility (I used cports.exe)


netstat -o -n -a | findstr 0.0:80
return 
“TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       9708”  

this 9708 is the process id (PID)
So you can go to Windows Task Manager and in “Process” tab you might have a column PID (or enable it view Menu -> select columns”), find the related process and stop them while using XAMPP.


Now you can enable Apache.

* There’ another way, by changing the apache running port in “xampp\apache\conf\extra\httpd-ssl.conf” same thing can be done.


Based on what I found in windows 7 with Visual Studio, Sql server 2008/2012 and related components batch file was made.


Xampp_support.bat


NET STOP ReportServer$SQL2012
NET STOP ReportServer$SQL2008
NET STOP WAS
NET STOP MsDepSvc
NET STOP PeerDistSvc


Note: PeerDistSvc is a fishy service and it restarts automatically so, as soon as you stop it, Apache required running

Comments

Popular posts from this blog

How to use Laptop / Notebook Battery

I found a news that might help most of laptop owners to get an idea about their Laptop/Notebook battery life related things. news item describes things like, Battery Basics, How to check your battery, Best Practices and more. " Best practices to maintain battery life You'd think that the best way to keep your laptop's battery from wearing out is to not use it. Right? As it turns out, batteries are like muscles; they need to be worked out regularly to stay healthy. Ideally, you'd use your laptop unplugged at least once a day, like on a train or bus commute or on the couch in front of the TV. If you're not going to use it, constantly charging your battery is a bad idea; HP recommends on their website that if you're going to leave your laptop plugged in or put up in storage for more than two weeks, you should take the battery out of your laptop." source : yahoo.com