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

C# Windows, Iterate through Menu Items (MenuStrip)

for (int i = 0; i < this.menuStrip1.Items.Count; i++) { //main menus items string mnuItemName = this.menuStrip1.Items[i].Name; ToolStripMenuItem tmpMenuItem = this.menuStrip1.Items[i] as ToolStripMenuItem; //check for sub menu for (int j = 0; j < tmpMenuItem.DropDownItems.Count; j++) { string menuSubItem = tmpMenuItem.DropDownItems[j].Name; } }

FckEditor panels hide behind the Model Popup

Using FckEditor with asp.net model popup, there a possibility of Property windows hide behind the model popup panel change the configuration value to higher value than existing fckconfig.js and find this line: FCKConfig.FloatingPanelsZIndex = 100005 ; // 100005 value can be changed according to the browser : These z-index values can be checked using Element inspection facility of Firebug or IE developer Tool Bar, by applying appropriate values for respective panels (using styles) is another workaround