Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Terrible Apache trouble on startup, Invalid argument / handle is invalid

Posted on 2009-05-15
Medium Priority
Last Modified: 2012-05-07
(using: windows vista business ed, apache 2.2)

Before I restarted my system, I restarted Apache and all was fine. Then I restarted my system (don't ask! ;-) and I found myself confronted with the following errors:

[notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations
[notice] Server built: Dec 10 2008 00:10:06
[crit] (22)Invalid argument: Parent: Failed to create the child process.
[crit] (OS 6)The handle is invalid.  : master_main: create child process failed. Exiting.
[notice] Parent: Forcing termination of child process 36

setting the loglevel to debug did not give more information about this "invalid argument". The windows event viewer gave me:

[warn] (OS 2)The system cannot find the file specified.  : No installed ConfigArgs for the service "Apache2.2", using Apache defaults.     .

but that's what it always used to give. Just before the error above, it confirms loading of PHP. I tried removing all virtual hosts, removed PHP etc, but to no avail. I checked the startup arguments, (changed them to see behavior if things go wrong) but don't seem to manage.

Anybody aware of what's going on? How do I find out what Apache is complaining about?
Question by:abel
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 57

Expert Comment

ID: 24401102
Anything in the security event logs?  Could be that something changed with security and Apache is no longer able to read/access some file or directory.
LVL 39

Author Comment

ID: 24401769
Well, by now and still being 100% of my time busy with this subject (I did sleep though), I have tracked a fair lot more. I went back to a very early restorepoint to rule out any recent installations (I had OpenVPN installed, and removed, TeamViewer and a driver). I tried:

  • safe mode, to rule out any other conflicts: same result
  • rebuild from source to rule out tampering with the exe or a dll: same result
  • reinstall in many different ways: same result
  • monitored file access denies: none
  • removed any other network / security tools: same result
  • tried to debug with WinDbg, it broke early with a write memory access denied, this error did not occur without WinDbg
  • tried to debug wih Visual Studio, it ran, but same result
  • tried to debug a DEBUG version (build successful), it broke early on an assertion, don't know how to continue there as the assertion is on some char conv fuction
  • tried different locations on my machine, each time with a clean install: same result
  • removed the Apache SF branch in registry, to prevent it loading its defaults: same result
  • ran three different virus scanners, no viruses (apart from some stale cookies): same result
  • did zillion times a netstat -a etc, arp -a (clear arp cache) but did not find any conflicts and after which it always was: the same result
  • tried to deliberately make mistakes in httpd.conf, these were noted (i.e., port conflicts, wrong directives etc).
I can't, for the life of me, think of what else I can do. I really don't want to remove my WAMP-like installation and change it into an IIS + PHP/Perl/Ruby installation. Sounds like a nightmare (for me: Apache I use for scripting, IIS I use for .NET and other MS technologies)

The only thing I can think of now that would bring me closer perhaps is setting up a breakpoint near the place where it goes wrong. The point is, I do no know how to do so, because the default run/install of the Apache Visual Studio project is to install itself and not to run from the environment. I have yet to find the correct resource to tell me how to step through the source (and that's me, a seasoned developer, not knowing how to step through source, LOL!!!). Strange when you consider that I don't have problems with Chrome source or Firefox to do the same....

-- Abel --
LVL 57

Assisted Solution

giltjr earned 2000 total points
ID: 24402278
Are you actually installing WAMP, or are you installing the various components seperately?

It looks like a registry entry/setting is not getting properly set.  Open your registry and look for:


Under parameters there should be a ConfigArgs that has something like:

C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf
C:\Program Files\Apache Software Foundation\Apache2.2\.

Now, it will appear all on one line until you go to edit the values.  If you have a custom build of Apache, say to enable SSL for example, then there may be some other options.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 39

Author Comment

ID: 24402895
Yes, I know of these settings. I did not do a pre-configured WAMP from some online distribution. The settings that you mention are set correctly (they used to point somewhere else, I have my configs on a different drive, but while doing all these repairs, I decided to only use the defaults, like you note above).

7 hours further, and loads of tests (basically, I focused on possible malware) but nothing found that shows that my computer is somehow badly configured. Only the malfunctioning apache (both in a self-build and in a freshly downloaded config).
LVL 57

Accepted Solution

giltjr earned 2000 total points
ID: 24404477
Issue the command:

     sc query Apache2.2

and see what you get back.  If you get nothing back then issue:

     sc query state=all | findstr /i /c:"Apache"

and see what you get back.
LVL 57

Expert Comment

ID: 24404496
I did some testing and the only way I could get the error message you were getting was not to have the ConfigArgs entry.  

As you state that you have the key (and were aware of the key) that I pointed I, I am guessing that somehow you have Apache installed as a Different service name and that under that key there is no ConfigArgs entry.

I do have a typo in the second command it should be:

     sc query state= all | findstru /i /c:"Apache"

In fact just enter the above command.  The difference between the two is the second and correct command has a space between the = sign and the word all.
LVL 39

Author Comment

ID: 24405633
The good news is: it works again. The bad news is, I'm not sure I really know why it works now.

The found service settings in the registry are interesting (esp. that you managed to reproduce this ill behavior of Apache!), but note that I had the same behavior when run from the commandline and when all registry settings were removed. After a default install (after first a full automatic + manual removal) these settings were back to their defaults, but that didn't help.

The story about how I got it working again is more related to possible malware, virware or trojware so I post that in the other question I asked about ill behavior of my system: http:Q_24414271.html (it seems more related to that then it is related to Apache). In short: running ComboFix did the trick, though I don't know how...

-- Abel --
LVL 57

Assisted Solution

giltjr earned 2000 total points
ID: 24405698

I actually glanced through some of Apache's source code and tried to find when it issued the message you were getting.  I'm have no knowledge of C programming so it was a tough to do, but it seemed that the registry settings and command passed on the start command were the issue.  That is why I started playing around with the settings.  Glad to see the problem is fixed.
LVL 39

Author Closing Comment

ID: 31581928
Maybe not "the answer", but that's not important. Nobody (see other threads) has been able to really find out what the problem was, but it was not with Apache, that's for sure.

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question