Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6768
  • Last Modified:

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

(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?
  • 5
  • 4
3 Solutions
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.
abelAuthor Commented:
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 --
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.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

abelAuthor Commented:
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).
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.
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.
abelAuthor Commented:
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 --

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.
abelAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now