Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XAMPP on Windows - Apache not starting

Tags:

apache

xampp

I have installed XAMPP on my windows 7 machine but can't get Apache to work.

On start I get the following errors:

13:09:21  [apache]  Apache Service Detected With Wrong Path
13:09:21  [apache]  Uninstall the service manually first
13:09:21  [apache]  Possible problem detected! 
13:09:21  [apache]  Port 80 in use by "system"!
13:09:21  [tomcat]  Tomcat Service Detected With Wrong Path
13:09:21  [tomcat]  Uninstall the service manually first

After opening the XAMPP panel and installing Apache service: I have tried start it, it always get stuck "Starting apache service..."

Any advice on how I could resolve this ?

Thanks Jamil

like image 368
Jamil Avatar asked Aug 03 '12 11:08

Jamil


People also ask

Why is my Apache not starting in XAMPP?

The most common cause for the XAMPP Apache server not starting issue is because the default port no 80 may already be in use by another program like Skype, Teamviewer etc. For example, in my previous blog post with the solution for XAMPP and Windows User Account Control warning message issue, Mr.

How do I start Apache in XAMPP?

Configuration Process of XAMPP Server Start the XAMPP control panel through the "Run as administrator" option. "XAMPP Control Panel" will appear on the screen and click on "Start" action to start the "Apache" and "MySQL" modules. The default XAMPP server settings should work for most users.

Why XAMPP is not working on my PC?

If you have done clean installation of Windows 10, you may not have the Word Wide Web Publishing Service. In that case, simple WAMP/XAMPP installation should work fine. If it doesn't, try installing Visual C++ Redistributable and then re-install WAMP/XAMPP.

Why Apache is not working?

There are several reasons your Apache server might fail to run. Something could be blocking the port it uses; there could be another instance of Apache already running; or there might be an incompatibility with the version of PHP you're using in MAMP.


4 Answers

I was able to fix this!

Had the same problems as stated above, made sure nothing was using port 80 and still not working and getting the message that Apache and Mysql were detected with the wrong path.

I did install XAMPP once before, uninstalled and reinstalled. I even manually uninstalled but still had issues.

The fix. Make sure you backup your system first!

  1. Start Services via Control Panel>Admin Tools (also with Ctrl+R and services.msc)

  2. Look for Apache and MySQL services. Look at the patch indicated in the description (right click on service then click on properties). Chances are that you have Apache listed twice, one from your correct install and one from a previous install. Even if you only see one, look at the path, chances are it's from a previous install and causing your install not to work. In either case, you need to delete those incorrect services.

    a. Got to command prompt (run as administrator): Start > all programs > Accessories > right click on Command Prompt > Select 'run as administrator'

    b. on command prompt type sc delete service, where service is the service you're wanting to delete, such as apache2.1 (or sc delete Apache2.4). It should be exactly as it appears in your services. If the service has spaces such as Apache 2.1 then enter it in quotes, i.e. sc delete "Apache 2.1"

    c. press enter. Now refresh or close/open your services window and you'll see it`s gone.

DO THIS for all services that XAMPP finds as running with an incorrect path.

Once you do this, go ahead and restart the XAMPP control panel (as administrator) and voila! all works. No conflicts

like image 138
Fernando Pineda Avatar answered Oct 08 '22 20:10

Fernando Pineda


my friend this the will fix ur problem ;)

in root of folder ( xampp ) just run this file ( setup_xampp.bat ) then press enter

and try to start the apache server

every things will work like charm ;)

like image 40
Tarek Sibay Avatar answered Oct 08 '22 21:10

Tarek Sibay


The most likely reason would be that something else is using port 80. (Often this can be Skype, IIS, etc.)

This tutorials shows How to Change the Apache Port in XAMPP

like image 3
smilly92 Avatar answered Oct 08 '22 20:10

smilly92


I spent over 3 hours to find out solution. Actually port 80 was being used by "system" service so I tried to change port from 80 to 8080 in "httpd" file but same problem raised "port 80 is used by system". It had driven me mad for 3 hours as every thing was changed like port , localhost server etc pointing to 8080.

At last I found mistake that was server root. Basically "Server Root" in "httpd" should be pointing to apache foler of xampp. In my case that's was

ServerRoot "xampp/apache"

I just changed it as follows:

ServerRoot "C:/xampp/apache" 

It has worked successfully and now everything is running with OK status.

like image 3
Junaid Shehzad Avatar answered Oct 08 '22 21:10

Junaid Shehzad