<p dir="ltr">Mod fcgid on apache has special directives to set environment variables, c.f. FcgidInitialEnv . on iis you hopefully have the same...</p>
<div class="gmail_quote">On Feb 10, 2015 8:18 AM, "geographika" <<a href="mailto:geographika@gmail.com">geographika@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Some further details after debugging. I modified mmaphttp.c and recompiled MapServer just to confirm the missing environment variables.<br>
<br>
  // pszCurlCABundle = "C:\\MapServer\\bin\\curl\\<u></u>curl-ca-bundle.crt"; // works when hardcoded<br>
  pszCurlCABundle = getenv("Path");<br>
  msDebug("Test CURL_CA_BUNDLE=%s\n", pszCurlCABundle);<br>
<br>
  test1 = getenv("Path");<br>
  msDebug("Path=%s\n", test1);<br>
<br>
Then run using mapserv the env variables are correct. When run in IIS using FastCGI both appear as null in the log file.<br>
<br>
[Tue Feb 10 13:54:13 2015].868000 Test CURL_CA_BUNDLE=(null)<br>
[Tue Feb 10 13:54:13 2015].868000 Path=(null)<br>
<br>
getenv is part of the standard C library <a href="http://www.codingunit.com/c-reference-stdlib-h-function-getenv" target="_blank">http://www.codingunit.com/c-<u></u>reference-stdlib-h-function-<u></u>getenv</a><br>
So I guess this must be an IIS/FastCGI issue rather than MapServer?<br>
<br>
Seth<br>
<br>
On 09/02/2015 21:48, Jeff McKenna wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2015-02-09 1:03 PM, geographika wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Jeff.<br>
The environment variable is definitely set in system variables, and I've<br>
rebooted a few times now. It also happens on both a w08r2 server and a<br>
Windows 7 machine.<br>
I can see it in<br>
HKEY_LOCAL_MACHINE\SYSTEM\<u></u>CurrentControlSet\Control\<u></u>Session<br>
Manager\Environment<br>
I'm using x64 MapServer, but the environment variables appear in my x64<br>
Python script.<br>
I had this working a couple of years ago, and tried to see if anything<br>
has changed in the MS source since but no luck.<br>
<br>
I think I should also be able to set it in the web.config using the<br>
following, but also no luck:<br>
<br>
         <fastCgi><br>
             <application fullPath="C:\Mapserver\bin\<u></u>mapserv.exe"><br>
                 <environmentVariables><br>
                     <environmentVariable name="CURL_CA_BUNDLE"<br>
value="C:\Mapserver\bin\curl\<u></u>curl-ca-bundle.crt" /><br>
                 </environmentVariables><br>
             </application><br>
         </fastCgi><br>
<br>
Regards,<br>
<br>
Seth<br>
<br>
<br>
</blockquote>
<br>
I think I may been in your exact shoes once, and it was a problem with the Curl library in the MapServer build (I believe Curl is used for this certification/communication, along with the OpenSSL, but you could clarify this with other developers).  I would also test with MS4W to see if you get the same problem.<br>
<br>
I think you said it used to work with an older MapServer version; I would therefore test on that same server with that same older MapServer version/package again too.<br>
<br>
Ha, this is how I debug (yes gives you grey hairs ha!).<br>
<br>
-jeff<br>
<br>
<br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a><br>
</blockquote></div>