[mapserver-users] help passing runtime variables through cgi obfuscation script

Brent Wood pcreso at yahoo.com
Thu Feb 14 20:19:45 PST 2019


Hi,
I hope this makes sense...
I'm using simple shell CGI scripts to avoid passing the mapfile name in the service URL, eg:
http://..../cgi-bin/species       with the species CGI script containing: 
#!/bin/bash
export MS_MAPFILE=/usr/lib/cgi-bin/mapfiles/species_enhancedsearch.map
/usr/lib/cgi-bin/mapserv
I can use this approach to get the value of the variable passed in the URL:species_code=`echo "$QUERY_STRING" | sed -n 's/^.*species_code=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"`

If I have a mapfile which uses runtime substitution to set a value in an SQL in the DATA statement:
... where c.species='%species_code%' ...
How do I pass this value to mapserver from the obfuscating script?

Thanks,
   Brent Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190215/4b6366eb/attachment.html>


More information about the mapserver-users mailing list