Re: help passing runtime variables through cgi obfuscation script
Stephen Woodbridge <[email protected]>
| Newsgroups | gmane.comp.gis.mapserver.user |
|---|---|
| Message-ID | <[email protected]> |
Have your script add the parameters to QUERY_STRING. Sent from my iPhone > On Feb 14, 2019, at 11:19 PM, Brent Wood <[email protected]> wrote: > > 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 > _______________________________________________ > mapserver-users mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users