13

I am using Windows 8 Pro. I have just installed XAMPP Windows 1.8.1. I tried to start Apache from the XAMPP control panel but it wont start. It gives the following error.

enter image description here

Also I have no IIS Services running, Web Deployment Agent Service also not running, World Wide Web Publishing Service also not running..

What could be the problem? Can anyone please help?

Error Log

rohan_vg
  • 1,087
  • 3
  • 15
  • 27
  • The problem seems somewhat obvious: `File does not exist` Do the files exist or not? If not, you got your problem. If yes, they do exist, apache might not have the permissions to access the files. – Strike Dec 12 '12 at 07:50
  • 3
    Start *xampp* tool with admin privileges. – KV Prajapati Dec 12 '12 at 07:50
  • Yes those files do not exist. Anyways I installed it again in another drive and it is working now. This is weird because I checked the installed files and those files still don't exist but it is somehow working. – rohan_vg Dec 12 '12 at 08:01
  • That error is usually a bad config line in the http.conf file. something may have a # left out or a missing # – Brad Dec 27 '12 at 23:05

23 Answers23

14

To Windows users:

You can easily "debug" this error by calling the apache httpd-service directly.

  1. Go to XAMPP\apache\bin
  2. Open a cmd-shell or Powershell here (From explorer: 'Shift' + 'right click' on a blank area in the folder)
  3. enter httpd.exe
  4. read the output

It is usually something within one of the many *.conf-files in the XAMPP\apache\conf\extra folders.

Kekzpanda
  • 752
  • 6
  • 15
12

As previously mentioned above in the comments - and tested out myself:

This error is rather ambiguous. Therefore, you should check the error.log located at \xampp\apache\logs

When I had this issue, it was because Skype was already listening on port 80 & 445. I was able to get around this by exiting Skype, starting the Apache service, and then restarting Skype. You can check the current port listeners by opening a command prompt and typing Netstat -a

It is also recommended to have User Account Control OFF as it may block some features built into xxamp.

Prior to this though, I had an issue after I modified my Apache httpd.conf file. Reverting those changes (or reinstalling in the user's case) will resolve that issue.

Zero
  • 287
  • 1
  • 5
  • 17
  • As a note, I had a similar issue with Xampp. It stopped working after I installed Spiceworks on the same machine. The default ports that Spiceworks listens on are 80 and 443 (identical to the default ports for Apache in Xampp). If you have the same issue as I did, this may help: https://community.spiceworks.com/topic/14561-how-do-i-change-spice-works-port – Brandon S. May 31 '16 at 18:42
5

I had this problem as well in XAMPP [XAMPP Control Panel v3.2.1] on Windows 8 64bit.

The first thing I done was to use the "Take Ownership" command (see below for a link) and this created a better error message.

From the error message above it changed to:

5:49:08 p.m. [Apache] Problem detected!
5:49:08 p.m. [Apache] Port 80 in use by "C:\Program Files (x86)\Skype\Phone\Skype.exe" with PID 4968!
5:49:08 p.m. [Apache] Apache WILL NOT start without the configured ports free!
5:49:08 p.m. [Apache] You need to uninstall/disable/reconfigure the blocking application
5:49:08 p.m. [Apache] or reconfigure Apache and the Control Panel to listen on a different port

Closing skype fixes this, reopening skype allows it to change the port number itself.

Adding this only because Google finds this error as the best result for "xampp apache wont start". Sorry for posting on an older issue.

Take Ownership Command: http://www.eightforums.com/tutorials/2814-take-ownership-add-context-menu-windows-8-a.html

shaedrich
  • 5,457
  • 3
  • 26
  • 42
Game Fero
  • 51
  • 1
  • 1
5

I am using Window 7 and It was same problem with me,I am using Skype and Not start Apache, but finally solved this problem, and It's working now

Check connection setting In Skype click tools -> click option -> click Advanced -> click connection Unchecked port number and click Save.

user5096887
  • 51
  • 1
  • 1
4

Look in the control panel: the service has not been installed yet!

Click the (X) button to install apache in windows service and reboot, it should be working now.

Jeroen Vannevel
  • 43,651
  • 22
  • 107
  • 170
Ez0r
  • 180
  • 3
  • 11
4

I had the same error, the error logs where empty, I ended up installing Apache as a service via XAMPP.

Now when I try and start Apache I at least get some informative errors in Windows Event Viewer.

Turned out to be a missing directory for a vhost, easy fix, however I was only able to view this error when attempting to start Apache as a service.

user25794
  • 716
  • 7
  • 14
  • Similar cause for me: a directory for an alias was missing (network mapped drive, which was down at the time). Cheers. – menrfa Nov 27 '15 at 09:20
3

First of all, after installation restart windows. As strange as it may be, this does matter. Also, check all apps occupying port 80 (e.g. Skype).

Finally, what resolved my situation - port 443. VMWare have been using this port. AFter killing the VMWare process, Apache worked just fine.

2

I reinstalled it in another drive and that fixed it. But I have no idea what caused the problem in the first place.

rohan_vg
  • 1,087
  • 3
  • 15
  • 27
2

For Linux Users:

The solution: In terminal: sudo /etc/init.d/apache2 stop

Edit: If you still get this kind of error at next computer start then you probably have apache2 process starting at computer startup.

To prevent apache2 starting automatically at startup: cd /etc/init.d/ sudo update-rc.d -f apache2 remove

Reboot your computer and now hopefully you can turn on Apache from the XAMPP Control Panel!

Combine
  • 3,894
  • 2
  • 27
  • 30
1

I commented Listen 443 directive in httpd-ssl.conf located on C:\xampp\apache\conf\extra, and that did the trick for me. Next restart Apache was green

motarski
  • 13
  • 5
1

I had the same problem. I started the Xampp Control Panel as an Administrator. That worked.

rideguide
  • 23
  • 4
1

Some process is using the port 443, so you can change the port that is used by xampp, to be able to use it. For this job you have to do this:

1- Open httpd-ssl.conf in xampp\apache\conf\extra

2- Look for the line containing Listen 443

3- Change port number to anything you want. I use 4430. ex. Listen 4430.

4- Replace every 443 strings in that file with 4430 and save the file.

Maryam Homayouni
  • 905
  • 9
  • 16
1

I experienced this issue and I preferred to free up the port .80 and my XAMPP/Apache restarted again. This is how I made the port .80 free. First: -Open a command prompt and type this :

netstat -aon | findstr :80

You'll get this display:enter image description here

Then type this command:

tasklist /fi "pid eq 4"

You'll get the name of the process using the is displayed. Now, press: Win+R services.msc in the invite, then press Ok. Now you can start stopping all services which can use the port .80.

Find some of them here: W3SVC,WAS,SSRS,PeerDistSvc,NcbService.

DOUMBIA Mamadou
  • 276
  • 2
  • 10
0

After trying all the suggestion given above. Disable this, install that. I opened the xampp-control manager from the start but this this as administrator. After I opened it. MySQL was disable. I disable all of the program and enable apache first and then MySQL. Suddenly start working with no problem.

0

I gave all users full access on the xampp folder, inclusive subdirectories. Afterwards it worked.

bitrevolution
  • 437
  • 6
  • 16
0

Open services.msc directly from command prompt and disabled SQL Server reporting services

& SQL Server analysis services.

Ankita P.
  • 478
  • 10
  • 21
0

I had the same case . The reason was that I had changed htdocs folder location to another drive and although made appropriate configuration, for physical reasons, when starting apache the drive was not accessible: After making it accessible the problem has been solved . Generally it seems logical that when apache doesn't find all of the components it won't start.

Hamlet Kraskian
  • 683
  • 9
  • 11
0

i had the same problem but after i went into the readme, i realised that i didn't have Microsoft Visual C++ 2008 Redistributable installed. after i instaled it, all worked just fine

  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – Michael Berkowski Dec 08 '14 at 18:44
  • how come it doesen't provide an answer? i just gave him or any other who reads this the solution of this error. i don't care about ppl voting my answer ... just wanted to give some helpful info. I found this question by searching the exact error fix and non of the answers given worked because all it neded was the redistributable installed. – Kyo Kusanagi Dec 09 '14 at 10:28
0

Although this person's question seems to have been answered, I just wanted to add that I received this error because I had a typo in my httpd-vhosts.conf file (got in a hurry and didn't specify a port on the VirtualHost tag).

Jerreck
  • 2,930
  • 3
  • 24
  • 42
0

If you have skype shutdown and the problem still persists. Try this. It could be that apache is set to automatic on restart. Meaning apache is already using that port. Go to services in your XAMPP control and look for apache (whatever version you have). Look for startup type and double-click it to set it to manual.

Hope this works!

0

If it helps to anyone, I currently use VMWare Workstation in my computer, and it also blocks Apache from starting, because VMWare Workstation listens for requests on port 443.

You can either comment out "listen 443" inside the "httpd-ssl.config" or you can disable "Shared VMs" from VMWare Workstation General Preferences.

0

If you use your skype ports, turn the ports off from the skype settings->Connections and unmark the port like where it says ports 80 till 443.

General Grievance
  • 4,555
  • 31
  • 31
  • 45
0

For those who have tried all the possible solutions here and still couldn't get apache to run

Go to your xampp folder and run apache_start.bat, this will give you a more detailed problem about why apache is not running, the problem for me was my php folder inside xampp was missing some dll's. Download the latest zip folder here https://windows.php.net/download/, you can choose either non-thread or the thread safe option but in my case i downloaded the thread safe option since i was missing "php8'ts'.dll"

You can extract the entire zip and replace the entire php folder or just copy the missing dlls from the zip and paste it to the php folder

Pika Meth
  • 19
  • 4