<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Yes.<br><br>Just as you have suggested. Have a CGI wrapper script, which determines the variable's value based on hostname (or whatever), then append this (to the QUERY_STRING prior to executing mapserver.<br><br>See: http://mapserver.org/cgi/wrapper.html<br><br>As shown in the link below, both the CONNECTION &amp; DATA strings in the mapfile are supported by the preprocessor for variable substitution.<br><br>http://mapserver.org/mapfile/variable_sub.html<br><br><br>Cheers,<br><br>Brent Wood<br><br><br><br>--- On <b>Sat, 4/30/11, Nicolas BOUTET <i>&lt;nicolas.boutet@geosys.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Nicolas BOUTET &lt;nicolas.boutet@geosys.com&gt;<br>Subject: [mapserver-users] Parameterized MapFile using CGI variable<br>To:
 mapserver-users@lists.osgeo.org<br>Date: Saturday, April 30, 2011, 1:56 AM<br><br><div id="yiv540988051"><style><!--
#yiv540988051  
 _filtered #yiv540988051 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv540988051 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#yiv540988051  
#yiv540988051 p.yiv540988051MsoNormal, #yiv540988051 li.yiv540988051MsoNormal, #yiv540988051 div.yiv540988051MsoNormal
        {margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"sans-serif";}
#yiv540988051 a:link, #yiv540988051 span.yiv540988051MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv540988051 a:visited, #yiv540988051 span.yiv540988051MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv540988051 span.yiv540988051EmailStyle17
        {font-family:"sans-serif";color:windowtext;}
#yiv540988051 .yiv540988051MsoChpDefault
        {}
 _filtered #yiv540988051 {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
#yiv540988051 div.yiv540988051WordSection1
        {}
--></style><div class="yiv540988051WordSection1"><p class="yiv540988051MsoNormal">Dear All,</p><p class="yiv540988051MsoNormal"> &nbsp;</p><p class="yiv540988051MsoNormal"><span lang="EN-US">I have 2 MapServer servers. One for Production use, and the other for Validation use.</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US">The MAP files placed on those servers are similar except that each server has a different Oracle database as datasource.</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US">For now, I have some different CONNECTION values depending if the map file is on the Production or on the Validation server. So finally I must have different MAP files.</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US"> &nbsp;</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US">Is there a way to have exactly the same map files on the 2 servers, and to use a variable to parameterize the CONNECTION.</span></p><p
 class="yiv540988051MsoNormal"><span lang="EN-US"> &nbsp;</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US">For example, I would like to set the CONNECTION of my layers to “%ORACLECONNECTIONSTRING%” and to set a CGI Environment variable named ORACLECONNECTIONSTRING to the correct value on each server. </span></p><p class="yiv540988051MsoNormal"><span lang="EN-US"> &nbsp;</span></p><p class="yiv540988051MsoNormal"><span lang="EN-US">Nicolas</span></p><p class="yiv540988051MsoNormal"> &nbsp;</p></div></div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></td></tr></table>