Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache/xampp command line start error: AH00436: No installed service named "Apache2.4"

I installed Apache server on Windows 7 Pro with Xampp distribution. Apache starts fine from the XAMPP Control Panel, but I want to be able to control it from a command prompt. When I try to start it from the command prompt, I am getting the following error:

C:\>httpd -k start [Fri Jun 14 13:21:59.055815 2013] [mpm_winnt:error] [pid 6344:tid 144] (OS 2)The system cannot find the file specified. : AH00436: No installed service named "Apache2.4".

I tried to change the Listen port in httpd.conf. It does not change anything. Any clues ?

Thanks.

like image 200
vlr Avatar asked Jun 14 '13 20:06

vlr


4 Answers

I had absolutely the same problem with the "AH00436: No installed service named “Apache2.4”" after I downloaded Apache 2.4 for Windows and tried to start it the first time.

The solution was very very simple. You get the error message when you manually try to start the webserver by "httpd -k start", but no service was defined yet.

just do a "httpd -k install" and the windows service is added to the registry. after that, the "httpd -k start" works without error message.

like image 127
user4378029 Avatar answered Oct 21 '22 19:10

user4378029


I have just got a similar error message when running the same command, but in my case I had just installed wamp from http://www.wampserver.com/en/

C:\wampserver\bin\apache\apache2.4.9\bin>httpd -k start [Mon Sep 29 14:27:05.203039 2014] [mpm_winnt:error] [pid 10720:tid 424] (OS 2)The system cannot find the file specified. : AH00436: No installed service named "Apache2.4".

I found that when I used the "-n" switch in the command line to include the name of the Apache web server service then it would work.

C:\wampserver\bin\apache\apache2.4.9\bin>httpd -n wampapache64 -k start

So it seems to me that unless the name of the service is included using the "-n" switch in the command line it is assumed that the name of the service to start is "Apache2.4". In my case I did not have a service called Apache2.4, so the command failed. I do have a service called wampapache64 though, so when I specified that service name in the command line it ran without error.

like image 6
Brian E Wilkins Avatar answered Oct 21 '22 19:10

Brian E Wilkins


I resolved the problem by installing the apache service. For apache, when i went to Apache -> Service, i couldn't even start the service, because those lines were disabled... so i installed the service, the line below the horizontal rule line.

Apparently, my apache didn't have allowed access on my computer... (That's when a window popped-up after installing the service asking to "Allow access" for apache on the computer)

Hope this helps.

Update I'm using wamp, not xampp.

like image 1
Jurijs Nesterovs Avatar answered Oct 21 '22 19:10

Jurijs Nesterovs


Any action triggered by the option -k (they are called signals), needs the Apache service to exist in Windows services list. Therefore, if you see this error message, there are only two possible causes:

Your Apache service does not exist

Then just create it with

httpd.exe -h install

Now you should be able to send the restart signal

httpd.exe -k restart

Your Apache service has a custom name

If the service exists, but has a custom name such as "My Awesome Apache Service", then you have to specify that name when you want to send it any signal.

So, if you have installed it with

httpd.exe -k install -n "My Awesome Apache Service"

you have to restart it with

httpd.exe -k restart -n "My Awesome Apache Service"
like image 1
Demis Palma ツ Avatar answered Oct 21 '22 19:10

Demis Palma ツ