[Mapserver-users] Passing CGI variables

Dharani Babu dharanibabus at hotmail.com
Thu Apr 15 21:08:20 PDT 2004


Hi David
   Thanks . I moved all the contents of 
C:/ms4w/apache/cgi-bin/mapserv_40.exe and all the other dlls into a folder 
C:/test/ mapserv.exe . Ok . Now I passed the command paramaters like this
C:\TEST>mapserv_40.exe "REQUEST_METHOD = GET" 
"QUERY_STRING=map=C%3A%2Fms4w%2Fapache%2Fhtdocs%2Fdemof%2Frock_pic.map&layer=tigerdata&zoomdir=1&zoomsize=2&progra
m=%2Fcgi-bin%2Fmapserv_40.exe&map_web_imagepath=C%3A%2Fms4w%2Fapache%2Fhtdocs%2Ftemp_rm6%2F&map_web_imageurl=%2Ftemp_rm6%2F"

I Got the following error .
This script can only be used to decode form results and
should be initiated as a CGI process via a httpd server.
I hope I am missing the syntax . I tried other combinations also still 
missing.pls tell me the syntax of it .
with regard and thanks
dharani

>From: David Mitchell <david.mitchell at telogis.com>
>To: Dharani Babu <dharanibabus at hotmail.com>
>CC: mapserver-users at lists.gis.umn.edu
>Subject: Re: [Mapserver-users] Passing CGI variables
>Date: Fri, 16 Apr 2004 13:43:08 +1200
>
>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.

_________________________________________________________________
Strike the right balance! News, gossip ‘n fundas! 
http://www.msn.co.in/women/ Get it all at MSN Women!




More information about the MapServer-users mailing list