[Mapserver-users] Passing CGI variables

David Mitchell david.mitchell at telogis.com
Thu Apr 15 18:43:08 PDT 2004


Dharani,

If you want you can call mapserv directly as you wish but you have to 
first set the QUERY_STRING and REQUEST_METHOD environment variables to 
trick it into thinking it is being accessed through IIS:

REQUEST_METHOD=GET
QUERY_STRING="zoomdir=1&zoomsize=2..."
C:/ms4w/apache/cgi-bin/mapserv_40.exe

That is all that IIS does anyway (not strictly true, IIS sets a few more 
variables and does a bit of house-keeping, but essentially the same). If 
your map has a template then the image will be in your temp folder and 
the std output of mapserv.exe will be the webpage (which you can throw 
away essentially).

David

Dharani Babu wrote:
> 
> Thanks Daniel - all
>   This helped me get a vb.net picture box based wrapper for the MS . I 
> have a question though .
> As you when we post the CGI variables we are in need of posting it in 
> the form of a html stream only--like
> "http://192.168.2.135/cgi-bin/mapserv_40.exe?zoomdir=1&zoomsize=2&" etc 
> . But is there any alternative so that I can pass it with
> "C:/ms4w/apache/cgi-bin/mapserv_40.exe?zoomdir=1&zoomsize=2&" ?
> But I know very well the map server exe works with Apache or IIS . But I 
> want to copy the map server exe and its associated dlls to a location 
> other then the cgi-bin or scripts . Is it possible ?
> Is there any way we can make MS exe to get the html stream and give us 
> the image in tmp folder WITHOUT  Apache or IIS ? I am trying to get a 
> soln by running dependency walker on ms exe and other trails with spy 
> tools . Still not yet solved .
> with regards and thanks in advance
> dharani
> 
> 
> 
> 
>> From: Daniel Morissette <dmorissette at dmsolutions.ca>
>> To: Dharani Babu <dharanibabus at hotmail.com>
>> CC: mapserver-users at lists.gis.umn.edu
>> Subject: Re: [Mapserver-users] Passing CGI variables
>> Date: Sat, 10 Apr 2004 11:54:24 -0400
>>
>> Dharani Babu wrote:
>>
>>> 1)   I am trying to pass the CGI variables to the map server exe 
>>> without HTML submission .Thats I am trying to disassociate the 
>>> browser based rendering .Could any of you point to the direction ?I 
>>> have been able to pass the url thro a C# /VB.net web browser control 
>>> . But searching for an alternative .   I tried passing CGI variables 
>>> thro command prompt but got a message that " cgi variables can be 
>>> passed only via httpd " .
>>>
>>
>> You can call the mapserv.exe at the command prompt using
>>
>>   mapserv.exe "QUERY_STRING=map=/path/to/yourmap.map&mode=...&..."
>>
>> Daniel
>> -- 
>> ------------------------------------------------------------
>>  Daniel Morissette               dmorissette at dmsolutions.ca
>>  DM Solutions Group              http://www.dmsolutions.ca/
>> ------------------------------------------------------------
>>
> 
> _________________________________________________________________
> Contact brides & grooms FREE! http://www.shaadi.com/ptnr.php?ptnr=hmltag 
> Only on www.shaadi.com. Register now!
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 


-- 
David Mitchell
Software Engineer
Telogis

NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.



More information about the MapServer-users mailing list