<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Have your script add the parameters to QUERY_STRING. <br><br><div id="AppleMailSignature" dir="ltr">Sent from my iPhone</div><div dir="ltr"><br>On Feb 14, 2019, at 11:19 PM, Brent Wood <<a href="mailto:pcreso@yahoo.com">pcreso@yahoo.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1550119469217_155341">Hi,</div><div><br></div><div>I hope this makes sense...</div><div><br></div><div id="yui_3_16_0_ym19_1_1550119469217_155286" dir="ltr">I'm using simple shell CGI scripts to avoid passing the mapfile name in the service URL, eg:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155630"><br></div><div><a href="http://..../cgi-bin/species">http://..../cgi-bin/species</a> with the species CGI script containing:</div><div id="yui_3_16_0_ym19_1_1550119469217_155309" dir="ltr"> <i id="yui_3_16_0_ym19_1_1550119469217_155378"><br></i></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155724"><i id="yui_3_16_0_ym19_1_1550119469217_155378">#!/bin/bash<br id="yui_3_16_0_ym19_1_1550119469217_155358">export MS_MAPFILE=/usr/lib/cgi-bin/mapfiles/species_enhancedsearch.map<br id="yui_3_16_0_ym19_1_1550119469217_155361">/usr/lib/cgi-bin/mapserv</i></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155377"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155560">I can use this approach to get the value of the variable passed in the URL:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155555"><i id="yui_3_16_0_ym19_1_1550119469217_155588">species_code=`echo "$QUERY_STRING" | sed -n 's/^.*species_code=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`</i><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155553"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155432">If I have a mapfile which uses runtime substitution to set a value in an SQL in the DATA statement:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155431"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155410"><i id="yui_3_16_0_ym19_1_1550119469217_155569">... where c.species='%species_code%' ...</i></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155536"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155537">How do I pass this value to mapserver from the obfuscating script?</div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155746"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155747"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155755">Thanks,</div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155756"><br></div><div dir="ltr" id="yui_3_16_0_ym19_1_1550119469217_155757"> Brent Wood<br></div></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>mapserver-users mailing list</span><br><span><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a></span><br><span><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></span></div></blockquote></body></html>