Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have Apache installed as part of XAMPP - local test server. It is configured as a Windows (XP) Service. Startup type is "Automatic". For a long time now it has always started when Windows boots up, but recently this has stopped happening. I now need to start it manually via the XAMPP Control Panel - at which point it appears to start up perfectly OK.

The only recent updates to the machine (that I recall) are Windows Updates - none of which appear to have "known issues" that relate to this. And updates to Google Chrome.

Any ideas what could prevent Apache from starting automatically at Windows (XP) boot up?

EDIT#1

There are 2 related Errors in my system event log regarding the Service Control Manager:

  1. Timeout (30000 milliseconds) waiting for the Apache2.2 service to connect.

  2. The Apache2.2 service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion.

When I manually start the Apache server after boot up there are 2 "information" events stating that it was "sent a start control" and that it "entered the running state". Although I notice it appears to take 19 seconds between the start control being sent and entering a running state - according to the event log.

So, maybe 30 seconds during boot up isn't long enough (anymore) for Apache to start??

share|improve this question

migrated from webmasters.stackexchange.com Apr 14 '12 at 13:50

This question came from our site for pro webmasters.

1 Answer 1

up vote 1 down vote accepted

If you experience service start up problems at boot for services set to "Automatic", try to delay it by configuring a dependency. E.g. set the apache service to depend on the TCP/IP stack. This way it will start only after the TCP/IP service.

Another way could be to set it to Manual, and have a scheduled task run at startup that invokes a script that waits for 60 seconds and the starts the apache service, like:

WScript.Sleep(60000)

strServiceName = "Apache Server Service"
Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colServices = objWMI.ExecQuery ("Select * from Win32_Service Where Name ='" & strServiceName & "'")
For Each objService in colServices
    objService.StartService()
Next
share|improve this answer
    
Making the Apache service dependent on the Fax service appears to have resolved the startup issue for Apache. However, this has resulted in another service failing to startup (same error) - although one which I do not currently use. –  w3d Apr 16 '12 at 8:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.