logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_fcgid on Windows XP and FastCGI apps build by VC++ 2005
Author
vitalus



Joined: 18 Jun 2009
Posts: 4

PostPosted: Sat 20 Jun '09 23:02    Post subject: mod_fcgid on Windows XP and FastCGI apps build by VC++ 2005 Reply with quote

This is important! I lost several days to find out what was wrong.. (@ see http://www.apachelounge.com/viewtopic.php?t=3051).

If you build FastCGI applications using Visual C++ 2005, 2008,.. (by those versions that use manifest for dependency management on C Runtime library known as msvcrXX.dll) remember to use the following declarations in httpd.conf:
...
DefaultInitEnv SystemRoot "C:\WINDOWS"
...

What is special here comparing to original docs (http://fastcgi.coremail.cn/doc.htm) - is a "\" but not "/"!!

The path "C:/WINDOWS" leads to R6034 exception (C Run-Time Error R6034).

It is XP only problem, on Vista, Windows Server 2003 the slash direction is not important.

Why is it so? It is because of _check_manifest() function fails during CRT initialization. See there:

static BOOL __cdecl _check_manifest(HMODULE hDllHandle)

{

/* We check that the dll is loaded through a manifest.
*
* We check several conditions and exceptions:
*
* (1) if (pre-fusion OS)
* return TRUE; [no need to check]
*
* (2) if dll is being loaded by instrumented-mscoree.dll.
* return TRUE;
*
* (3) if (dll is loaded from system32)
* return FALSE;
*
* (4) if (!(loaded through a manifest))
* return FALSE;
*
* (5) if (loaded from %SystemRoot%\WinSxS)
* return TRUE; [loaded from the WinSxS cache]
*
* (6) if (manifest is in the same folder as the dll)
* return TRUE;
*
* (7) return FALSE; [loaded with another manifest]
*
* In general, when we encounter an error condition or something
* which blocks us from checking if the dll is loaded through a
* manifest, we do not return an error, but we let the dll to be
* loaded. Notice that this is not a security feature: it's an helper
* which will try (as much as possible) to discourage the practice
* of not using a manifest to load the crt dll.
*/

The 5th checking fails on XP with a path "C:/WINDOWS\WinSxS" .... seems it is a simple copmarison without pre-formatting of the path on XP, improved on later OS versions.
Back to top


Reply to topic   Topic: mod_fcgid on Windows XP and FastCGI apps build by VC++ 2005 View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules