Apache won't start in wamp
Asked Answered
T

16

44

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

Trimorphism answered 14/3, 2014 at 21:52 Comment(2)
look at the apache errors logs. Without more details, that's about all we can tell you.Hydrophane
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.Trimorphism
S
126

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 validate 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.

Salina answered 15/3, 2014 at 9:46 Comment(5)
Very helpful, thanks. I couldn't find any errors in the Apache error log - turned out they were being caught by the windows service manager and I needed to look in the event viewer.Irrawaddy
i used httpd.exe -t command to fix the syntax errors , thanksFogdog
This answer helped me find a blunder when pointing the directory away from the install directory. I added "www" too many times, and this was the way to find the error telling me so.Desalinate
that was a savior!Eupatrid
This is helpful, my Apache error log was also not containing any errors. Just small thing, in my case instead of typing httpd.exe -t, I needed to type .\httpd.exeStilwell
C
20

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.

Citron answered 23/4, 2015 at 4:36 Comment(8)
Unfortunately, this answer is inaccurate. Obviously no service named Apache2.4 exists, because Wamp installs a service called wampapache, not Apache2.4. Re-installing a different version may require a new Microsoft Visual C++ Redistributable, which would mean that some dlls may be missing, if you don't. This problem, though, is probably not related to the service missing. Please check your httpd.conf. Even if its syntax is correct, you may have some other error, like binding to the wrong IP address. See Raymon's answer for more.Agranulocytosis
At the time of the answer it was accurate, probably new Wamps have renamed services, I user Homestead-Vagrant-Box now. Try it.Citron
I'm in no means trying to open a dispute, but I am pretty sure that this hasn't changed at least 3-4 years now, because I was using a version of Wamp that old, until quite recently. Nevertheless, it is not accurate now, and I only wrote this information to help new readers. No hard feelings.Agranulocytosis
I fear it was never accurate. The WAMPServer Apache service has always been called wampapache and more recently if you install the 64 bit version wampapache64Salina
The command httpd -k install will run but it will create a service with the default name of ApacheSalina
I removed controversial partsCitron
@mavrosxristoforos, I don't see Raymon's answer any more.Citron
@YevgeniyAfanasyev Yes, me neither. I cannot recall any of the information that it had, but your answer seems better now.Agranulocytosis
P
20

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.
Pufahl answered 4/6, 2015 at 14:4 Comment(1)
Hey, thanks in advanced. I followed your steps and got this: SetEnv PATH "C:\Bitnami\wampstack-7.3.11-0/apache2/bin;${PATH}"Arvind
N
2

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

Negligent answered 28/6, 2021 at 16:3 Comment(0)
B
1

This solved the issue for me:

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

Beep answered 14/6, 2020 at 20:52 Comment(0)
B
0

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

Biotope answered 10/7, 2015 at 11:23 Comment(0)
D
0

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.

Devonna answered 14/7, 2015 at 23:34 Comment(0)
A
0

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.

Auxin answered 30/9, 2015 at 7:11 Comment(0)
E
0

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

Endblown answered 27/12, 2015 at 13:9 Comment(0)
H
0

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

Hydroscope answered 30/9, 2016 at 13:23 Comment(0)
J
0

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%"

Juvenescence answered 30/9, 2016 at 14:23 Comment(0)
A
0

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.

Almond answered 25/11, 2016 at 9:30 Comment(0)
T
0

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!!

Tacitus answered 13/9, 2017 at 7:18 Comment(0)
C
0

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

Conformal answered 29/7, 2019 at 18:24 Comment(1)
This will install Apache as a service, however it will use the default name for the service and therefore is IRRELEVANT to the question which was about WAMPServer. The Apache service in WAMPServer should have the name wampapache or wampapache64Salina
P
0

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

Pagandom answered 4/1, 2021 at 11:22 Comment(1)
I assume you mean the MSVC C/C++ Runtimes. You do not need MS Visual C++ installed, however that will install one of the MSVC C/C++ libraries you do need :)Salina
P
0

If you have Microsoft Visual Studio running at time of running, try to disconnect it and try again

Philipson answered 3/7, 2022 at 18:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.