<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Thanks for the reply. <br>
      It should be possible to set these in IIS in the web.config file
      as outlined here: <a
href="http://www.iis.net/configreference/system.webserver/fastcgi/application/environmentvariables">http://www.iis.net/configreference/system.webserver/fastcgi/application/environmentvariables</a><br>
      <br>
              <fastCgi><br>
                  <application
      fullPath="C:\Mapserver\bin\mapserv.exe"><br>
                      <environmentVariables><br>
                          <environmentVariable name="CURL_CA_BUNDLE"
      value="C:\Mapserver\bin\curl\curl-ca-bundle.crt" /><br>
                      </environmentVariables><br>
                  </application><br>
              </fastCgi><br>
              <br>
          <handlers><br>
              <add name="MapServerFastCgi" path="*" verb="*" type=""
      modules="FastCgiModule"
      scriptProcessor="C:\Mapserver\bin\mapserv.exe"
      resourceType="Unspecified" <br>
            requireAccess="Script" allowPathInfo="false" preCondition=""
      responseBufferLimit="4194304" /><br>
          </handlers><br>
      <a
href="http://www.iis.net/configreference/system.webserver/fastcgi/application/environmentvariables"></a><br>
      However I've tried at all levels (app, web site, server) with no
      luck.<br>
      <br>
      On 10/02/2015 14:22, thomas bonfort wrote:<br>
    </div>
    <blockquote
cite="mid:CAOM3y2iH-nm=gaujW0E_S9kHZLZhjL_-byfDDXx9gyiRV_k1dg@mail.gmail.com"
      type="cite">
      <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 moz-do-not-send="true"
          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\\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
            moz-do-not-send="true"
            href="http://www.codingunit.com/c-reference-stdlib-h-function-getenv"
            target="_blank">http://www.codingunit.com/c-reference-stdlib-h-function-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\CurrentControlSet\Control\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\mapserv.exe"><br>
                               <environmentVariables><br>
                                   <environmentVariable
              name="CURL_CA_BUNDLE"<br>
              value="C:\Mapserver\bin\curl\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>
          _______________________________________________<br>
          mapserver-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:mapserver-users@lists.osgeo.org"
            target="_blank">mapserver-users@lists.osgeo.org</a><br>
          <a moz-do-not-send="true"
            href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
            target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>