<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.Shkpostityyli17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I don’t know what really fails because I have never used Mapserver this way. However, the error message seems to be true.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">When using Mapserver trough WMS the same message comes with a request
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities">http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If map parameter is used with an invalid value the error message is different<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a href="http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities&map=foo">http://hip.latuviitta.org/cgi-bin/mapserv?service=wms&version=1.3.0&request=getcapabilities&map=foo</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Have a look at the code and think if the name of your mapfile really goes into [map].<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Enrico Fiore wrote:<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">Sorry I have sent the first message for error, I conclude it in this post<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-US">the template file text is:<br>
<br>
<!-- MapServer Template </span>--><br>
<html><br>
<head><title>Seconda Mappa</title></head><br>
<body><br>
<form name="the_form" method=GET action="[program]"><br>
<table width="100%"><br>
<tr><br>
<td width="60%"><br>
<input name="img" type="image" src="[img]" width=640 height=480 order=2>
<br>
</td><br>
<td width="40%" align="left"><br>
<table border="1" width="300"><br>
<tr><br>
<td align="center" colspan=3"><br>
<input type="submit" value="Ricarica"><br>
</td><br>
</tr><br>
<tr><br>
<td align="center" colspan="3">Zoom</td><br>
</tr><br>
<tr><br>
<td align="right" width="100"><br>
Zoom In<br>
<input type=radio name=zoomdir value=1 [zoom_dir_1_check]<br>
</td><br>
<td align="right" width="100"><br>
Size<br>
<input type=text name=zoomsize size=2 value=[zoomsize]><br>
</td><br>
</tr><br>
<tr><br>
<td align="center" colspan="3"><br>
Pan<br>
<input type=radio name=zoomdir value=0 [zoomdir_0_check]><br>
</td><br>
</tr><br>
</table><br>
<hr size="1"><br>
<table><br>
<tr><br>
<td colspan="3"><br>
<input type="checkbox" name="layer" value="Regioni" [Regioni_check]><br>
Regioni<br>
</td><br>
</tr><br>
<tr><br>
<td colspan="3"><br>
<input type="checkbox" name="layer" value="Fiumi" [Fiumi_check]><br>
Fiumi<br>
</td><br>
</tr><br>
<tr><br>
<td colspan="3"><br>
<input type="checkbox" name="layer" value="Province" [Province_check]><br>
Province<br>
</td><br>
</tr><br>
</table><br>
</td><br>
</tr> <br>
</table><br>
<input type="hidden" name="imgxy" value="320 240"><br>
<input type="hidden" name="imgext" value="[mapext]"><br>
<input type="hidden" name="map" value="[map]"><br>
<input type="hidden" name="program" value="[program]"><br>
</form><br>
</body><br>
</html><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">My question is what I miss in my exercise.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Can anyone help me?<br>
<br>
And sorry for to have split the message in two post.<br>
<br>
With thanks,<o:p></o:p></p>
</div>
<p class="MsoNormal">Enrico<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2014-05-14 14:58 GMT+02:00 Enrico Fiore <<a href="mailto:enricofiore80@gmail.com" target="_blank">enricofiore80@gmail.com</a>>:<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<p class="MsoNormal">I tried to create a simple map application whit zoom and pan capabilities, following the instructions contained in the book "Beginning MapServer".<br>
I created a map file (secondo.map), an initialization file (secondo_i.html) and a template file (secondo.html).<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
When I lunch the command <br>
<br>
<a href="http://localhost/secondo_i.html" target="_blank">http://localhost/secondo_i.html</a>
<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">the browser shows this error message:<br>
<br>
msCGILoadMap(): Web application error. CGI variable "map" is not set. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I work with Mapserver 6.4.1-2 and OS: Ubuntu 14.04<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Text contained in initialization file:<br>
<br>
<html><br>
<head><title>MapServer Seconda mappa</title></head><br>
<body><br>
<form method=POST action="/cgi-bin/mapserv"><br>
<input type="submit" value="Clicca qui"><br>
<input type="hidden" name="program" value="/cgi-bin/mapserv"<br>
<input type="hidden" name= "map" value = "/home/enrico/mapserverdata/secondo.map"><br>
<input type="hidden" name="zoomsize" size=2 value=2><br>
<input type="hidden" name="layers" value="Regioni Fiumi Province"><br>
</form><br>
</body><br>
</html> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>