<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: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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        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:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2101443853;
        mso-list-type:hybrid;
        mso-list-template-ids:-733302526 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello everybody,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am maintaining a system for a customer that links to mapserver -- we’re not mapserver users, they are.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Some time back, when they used mapserver v5.6, we put a partial mapserver CGI url in one of their configuration files. The idea was that they could edit it if they ever needed to in future, e.g. if they changed sever location for mapserver.
 They later upgraded to mapserver 6.0, but cjust changing the target server failed.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The original query substring was along the lines of:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a href="http://someserver.ourcustomer.co.uk/MapServer/cgi-bin5.6/mapserv.exe?map=D:\Maps\CCC\Intranet52\_MapServerConfig\Surveys.map_AND_mode=ITEMNQUERYMAP_AND_qlayer=Buildings_AND_map.layer%5bBuildings%5d=TEMPLATE+'_MapServerTemplates\Buildings_fields.xml'_AND_qitem=SHORT_CODE_EMS_AND_qstring">http://someserver.ourcustomer.co.uk/MapServer/cgi-bin5.6/mapserv.exe?map=D:\Maps\CCC\Intranet52\_MapServerConfig\Surveys.map_AND_mode=ITEMNQUERYMAP_AND_qlayer=Buildings_AND_map.layer%5bBuildings%5d=TEMPLATE+'_MapServerTemplates\Buildings_fields.xml'_AND_qitem=SHORT_CODE_EMS_AND_qstring</a>= 
 {application adds the rest here depending on what the user wants on that invocation}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I looked at the 5.6 to 6.0 migration guide at <a href="http://www.mapserver.org/MIGRATION_GUIDE.html#mapserver-5-6-to-6-0-migration">
http://www.mapserver.org/MIGRATION_GUIDE.html#mapserver-5-6-to-6-0-migration</a> and in the CGI section it says:<o:p></o:p></p>
<p class="MsoNormal">    All of the query map related modes (e.g. NQUERYMAP, ITEMQUERYMAP, etc...) have been removed in favor of using the “qformat” parameter. That parameter takes an output format name or mime/type as a value and uses that to process a set
 of query results. For example:<o:p></o:p></p>
<p class="MsoNormal">...&mode=nquerymap&... would become ...&mode=nquery&qformat=png24&...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So I tried a simple substitution in line with that and changed our substring to:<o:p></o:p></p>
<p class="MsoNormal"><a href="http://vishare.cardiff.gov.uk/mapserv6/cgi-bin6.0/mapserv.exe?map=D:\Maps\CCC\Intranet52\_MapServerConfig\Surveys.map_AND_mode=ITEMNQUERY_AND_qformat=png24_AND_qlayer=Buildings_AND_map.layer%5bBuildings%5d=TEMPLATE+'_MapServerTemplates\Buildings_fields.xml'_AND_qitem=SHORT_CODE_EMS_AND_qstring">http://<span style="color:windowtext;text-decoration:none">
</span>someserver.ourcustomer.co.uk /mapserv6/cgi-bin6.0/mapserv.exe?map=D:\Maps\CCC\Intranet52\_MapServerConfig\Surveys.map_AND_mode=ITEMNQUERY_AND_qformat=png24_AND_qlayer=Buildings_AND_map.layer%5bBuildings%5d=TEMPLATE+'_MapServerTemplates\Buildings_fields.xml'_AND_qitem=SHORT_CODE_EMS_AND_qstring</a>=
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">…i.e. I changed the target from the 5.6 to 6.0 server and changed “mode=ITEMNQUERYMAP” to “mode=ITEMNQUERY_AND_qformat=png24”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This did not meet with success, I got a “Parameter is not valid” error with the following stack trace:<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Verdana",sans-serif">[ArgumentException: Parameter is not valid.]<br>
System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +1067179<br>
System.Drawing.Image.FromStream(Stream stream) +8<br>
SurveysReporting.ReportProvider.GenerateReport(ReportName rnName, String szShortCode) +4371<br>
Reports_Preview.Page_Load(Object sender, EventArgs e) +374<br>
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14<br>
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35<br>
System.Web.UI.Control.OnLoad(EventArgs e) +99<br>
System.Web.UI.Control.LoadRecursive() +50<br>
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Superficially, this error doesn’t seem to have much to do with the parameter I changed.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">At this point, I would like to ask some more experienced mapserver users a few questions:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Is my substitution of “mode=ITEMNQUERYMAP” to “mode=ITEMNQUERY_AND_qformat=png24” a viable solution in itself?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Does anything else in the amended query substring above jump out as incorrect in v6.0?<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">      
</span></span><![endif]>Does the error message received look like the sort of thing that would apply to the rest of the CGI query, i.e. the stuff that’s added on the end to suit the specific user request?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m really hoping for 2, because otherwise I’ll have to get our legacy application running and then learn mapserver syntax to change what it’s sending.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance for any help or advice.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span lang="EN-GB" style="color:#1F497D">Joel Benford<o:p></o:p></span></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
----------------------------------------------------------------------------<br>
The information contained in or attached to this message is the responsibility of the sender and is meant for the confidential use of the intended recipients. It does not necessarily represent the position of Aligned Assets. If you are not an intended recipient
 you are notified that you have received this communication in error and that review, dissemination or copying of this communication is prohibited.<br>
If you have received this in error, please notify us.<br>
Aligned Assets Limited<br>
Unit 5<br>
River Court<br>
Albert Drive<br>
Sheerwater<br>
Woking<br>
GU21 5RP<br>
Company Registration No: 4610724<br>
----------------------------------------------------------------------------<br>
</body>
</html>