I don’t know what really fails because I have never used Mapserver this way. 
However, the error message seems to be true.
When using Mapserver trough WMS the same message comes with a request
http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities
If map parameter is used with an invalid value the error message is different
http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities&map=foo

Have a look at the code and think if the name of your mapfile really goes into 
[map].

-Jukka Rahkonen-



Enrico Fiore wrote:

Sorry I have sent the first message for error, I conclude it in this post
the template file text is:

<!-- MapServer Template -->
<html>
    <head><title>Seconda Mappa</title></head>
    <body>
        <form name="the_form" method=GET action="[program]">
            <table width="100%">
                <tr>
                    <td width="60%">
                        <input name="img" type="image" src="[img]" width=640 
height=480 order=2>
                    </td>
                    <td width="40%" align="left">
                        <table border="1" width="300">
                            <tr>
                                <td align="center" colspan=3">
                                    <input type="submit" value="Ricarica">
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="3">Zoom</td>
                            </tr>
                            <tr>
                                <td align="right" width="100">
                                    Zoom In
                                    <input type=radio name=zoomdir value=1 
[zoom_dir_1_check]
                                </td>
                                <td align="right" width="100">
                                    Size
                                    <input type=text name=zoomsize size=2 
value=[zoomsize]>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="3">
                                    Pan
                                    <input type=radio name=zoomdir value=0 
[zoomdir_0_check]>
                                </td>
                            </tr>
                        </table>
                        <hr size="1">
                        <table>
                            <tr>
                                <td colspan="3">
                                    <input type="checkbox" name="layer" 
value="Regioni" [Regioni_check]>
                                    Regioni
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <input type="checkbox" name="layer" 
value="Fiumi" [Fiumi_check]>
                                    Fiumi
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <input type="checkbox" name="layer" 
value="Province" [Province_check]>
                                    Province
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <input type="hidden" name="imgxy" value="320 240">
            <input type="hidden" name="imgext" value="[mapext]">
            <input type="hidden" name="map" value="[map]">
            <input type="hidden" name="program" value="[program]">
        </form>
    </body>
</html>

My question is what I miss in my exercise.
Can anyone help me?

And sorry for to have split the message in two post.

With thanks,
Enrico


2014-05-14 14:58 GMT+02:00 Enrico Fiore 
<[email protected]<mailto:[email protected]>>:
Hi,
I tried to create a simple map application whit zoom and pan capabilities, 
following the instructions contained in the book "Beginning MapServer".
I created a map file (secondo.map), an initialization file (secondo_i.html) and 
a template file (secondo.html).

When I lunch the command

http://localhost/secondo_i.html
the browser shows this error message:

msCGILoadMap(): Web application error. CGI variable "map" is not set.
I work with Mapserver 6.4.1-2 and OS: Ubuntu 14.04


Text contained in initialization file:

<html>
    <head><title>MapServer Seconda mappa</title></head>
    <body>
        <form method=POST action="/cgi-bin/mapserv">
            <input type="submit" value="Clicca qui">
            <input type="hidden" name="program" value="/cgi-bin/mapserv"
            <input type="hidden" name= "map" value = 
"/home/enrico/mapserverdata/secondo.map">
            <input type="hidden" name="zoomsize" size=2 value=2>
            <input type="hidden" name="layers" value="Regioni Fiumi Province">
        </form>
    </body>
</html>


_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to