43
votes

I have been googling for the past few hours but I simply can't get my apache on wamp to start. My skype isn't running, and the test port 80 shows it isn't being used by anything. Before this happened, I was trying to add a new vhost, but now I have reverted back all of the files where I made changes. Anyway to debug why apache won't start?

Clicking on start/resume service for apache doesn't show any errors either.

Also just in case, I am running Win7 64bit

15
look at the apache errors logs. Without more details, that's about all we can tell you.Marc B
Please do let me know what info is needed. As for the error log, I've already checked it and there doesn't seem to be any errors. the last three lines are [Sat Mar 15 02:36:26.040647 2014] [mpm_winnt:notice] [pid 1352:tid 344] AH00422: Parent: Received shutdown signal -- Shutting down the server. [Sat Mar 15 02:36:28.056762 2014] [mpm_winnt:notice] [pid 1308:tid 236] AH00364: Child: All worker threads have exited. [Sat Mar 15 02:36:28.139767 2014] [mpm_winnt:notice] [pid 1352:tid 344] AH00430: Parent: Child process 1308 exited successfully.Aoi

15 Answers

119
votes

If you have an issue in the httpd.conf or any files included by it there are a couple of ways to find out what the problem is

First look at your Windows Event Viewer. Click on the Windows link in the menu on the left, and then submenu Applications. Look for messages from Apache with the red error icon.

Secondly, open a command window, then CD into \wamp\bin\apache\apache2.x.y\bin, replace x,y with your actual version. Now you can run this command to get Apache(httpd) to vaidate the httpd.conf file.

httpd.exe -t

This should give errors with line numbers related to the http.conf file. It stops on the first error, so you will have to keep running it and fixing the error and then run it again until it gives the all OK message.

19
votes

Use apaches startup debug tool from command:

httpd.exe -e warn

  1. press Win+R
  2. type cmd and press enter
  3. goto directory which contains your apache httpd.exe file. for example if your wamp is installed in e:\wamp type cd /d e:\wamp\bin\apache\ApacheX.X.X\bin in cmd and press enter.
  4. type httpd.exe -e warn (or httpd.exe -e debug for more details) to see error message about problem which is prohibiting apache to start.
19
votes

That is what I did and it helped me to find out what my Apache-PHP needed:

C:\Users\Admin>cd C:\wamp\bin\apache\apache2.4.9\bin

C:\wamp\bin\apache\apache2.4.9\bin>httpd -t
Syntax OK

C:\wamp\bin\apache\apache2.4.9\bin>httpd -k start
[Thu Apr 23 14:14:52.150189 2015] [mpm_winnt:error] [pid 3184:tid 112] 
(OS 2)The system cannot find the file specified.  : AH00436: 
No installed service named "Apache2.4".

C:\wamp\bin\apache\apache2.4.9\bin>

The most simple solution:

Uninstall and reinstall WAMP (do not even try to set it up on top of existing installation - it would not help)

P.S.

If you wonder how did I get to this situation, here is the answer: I was trying to install WAMP and it throws me an error in the middle of installation saying:

httpd.exe - System Error

The program can't start because MSVCR110.dll is missing from your computer. 
Try reinstalling the program to fix this problem.

OK

I got and installed Microsoft Visual C++ 2012 Redistributable from here http://www.microsoft.com/en-us/download/details.aspx?id=30679#

And it gave me the "dll" and the MYSQL started working, but not Apache. To make Apache to work I uninstalled and reinstalled WAMP.

1
votes

This solved the issue for me:

Right click on the WAMP system try icon -> Tools -> Reinstall all services

0
votes

Invalid Command '80HostnameLookups' , perhaps misspelled or defined by a module not included in the server configuration
I got this error when I debug the issue (wamp server was not going online) by the procedure defined by @RiggsFolly. Just comment the line 80HostnameLookups Off by changing it to #80HostnameLookups Off. This solution worked for me and apache starts running.
Note:80HostnameLookups Off can be found on line 222 of httpd.conf file located in C:\wamp\bin\apache\apache2.4.9\conf

0
votes

phpmyadmin.conf opened with apacheconf.exe and contents chained so you must do the following:

  1. copy contents of phpsysinfo.conf [C:\wamp\alias]
  2. paste into phpmyadmin.conf [C:\wamp\alias]
  3. change Alias /phpsysinfo "c:/wamp/apps/phpsysinfo3.1.12/" to Alias /phpmyadmin "c:/wamp/apps/phpmyadmin4.1.14/"
  4. change <Directory c:/wamp/apps/phpsysinfo3.1.12/ /> to <Directory c:/wamp/apps/phpmyadmin4.1.14/ />

its worked for me.

0
votes

My solution was that 2 .dll files(msvcp110.dll, msvcr110.dll) were missing from the directory : C:\wamp\bin\apache\apache2.4.9\bin So I copied these 2 files to all these locations just in case and restarted wamp it worked C:\wamp C:\wamp\bin\apache\apache2.4.9\bin C:\wamp\bin\apache\apache2.4.9 C:\wamp\bin\mysql\mysql5.6.17 C:\wamp\bin\php\php5.5.12

I hope this helps someone out.

0
votes

Sometimes it is Skype or another application "Holding" on to port 80. Jusct close Skype

0
votes

My solution on Windows 10 was just to stop IIS (Internet Information Services).

0
votes

If Apache is installed as a Windows service, any errors will show up in the Windows System event log. To view the System event log, navigate to Windows Administrative Tools->Event Viewer and open the System log in the Windows Logs folder. Or, you can see the same errors by running httpd.exe at the command line. In my case, httpd.exe is located here: C:\Bitnami\wampstack-5.6.26-2\apache2\bin.

If there is a problem with starting Apache, most likely the problem can be fixed by editing the httpd.conf file located in the \apache2\conf folder. As already suggested, you can check the syntax of the httpd.conf file by running httpd.exe -t at the command line.

I found that the I had to

Change SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;${PATH}" in httpd.conf

to

SetEnv PATH "C:\Bitnami\wampstack-5.6.26-2\apache2\bin;%PATH%"

0
votes

I had the same problem. My port 80 was not in use.

After thorough research, all I did was to download Update for Universal C Runtime.

Once installed and my PC restarted, all was OK.

0
votes

I was having the same problem, the mysql service was starting but not the apache service, the main problem about that is one of your virtual hosts isn't config. correctly, all i did was deleted the virtual host that i created "D:\wamp\bin\apache\apache2.4.23\conf\extra\httpd-vhosts, restarted all services apache service started working correctly and so i just went to localhost and added a virtual host automatically and so it worked!!

0
votes

I was having same problem.

I followed this steps, problem solved.

run command line (CMD) with Administrator Permission.

cd c:/wamp64/bin/apache/apache2.4.27/bin

httpd.exe -k uninstall

httpd.exe -k install

at last restart all services from wamp system tray icon

0
votes

It turns out I didn't have Microsoft visual c++ installed, installing it solved the problem for me.

0
votes

Go to C directory and then go to below mentiond path of you wamp server.

C:\wamp64\bin\apache\apache2.4.46\bin>

Then in Address bar enter "CMD" and press enter.that wil open the command prompt. Now past below comman

httpd.exe -e warn

to see error message about problem which is prohibiting apache to start. If you error is releated to port then Right click on wamp server than on apache and then on httpd.confg, Now search 80 and replace with 81 in that file and close and restart wamp