<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="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 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p.avgcert, li.avgcert, div.avgcert
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Comic Sans MS";
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'>This is
probably related to the different ways results are accessed in PHP MapScript.&nbsp;
This changed between version 5.4 and 5.6 and again between 5.6 and 6.0.&nbsp;
See the two functions below.&nbsp; The first shows the differences between the
versions.&nbsp; The second function is trying to get an object with numResults
and bounds of the results in it.&nbsp; This is easy in version 6.0 but requires
a loop to get the bounds in earlier versions.&nbsp; This loop will show you the
differences in version 5.4 and 5.6.&nbsp; Note the layer-&gt;open and close
used only in version 5.4.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'>I hope this
helps.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; static function
layerGetShape($layer, $result) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; if
(MAPSERVER_VERSION &lt; 50600) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;getFeature($result-&gt;shapeindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; } else if
(MAPSERVER_VERSION &lt; 60000) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;resultsGetShape($result-&gt;shapeindex,$result-&gt;tileindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; } else {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;getShape( $result );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; return
$shape;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; static function
layerGetResultsObj($layer, $getBounds = FALSE) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; $debug =
Debug::getInstance();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - MAPSERVER_VERSION = &quot;.MAPSERVER_VERSION);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
$results-&gt;numresults = $layer-&gt;getNumResults();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - results-&gt;numresults =
&quot;.$results-&gt;numresults);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; if
(MAPSERVER_VERSION &gt;= 60000) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds = $layer-&gt;getResultsBounds();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; } else {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds = NULL;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($getBounds &amp;&amp; $results-&gt;numresults &gt; 0) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - in get bounds if&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$result = $layer-&gt;getResult(0);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - shapeindex=&quot;.$result-&gt;shapeindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (MAPSERVER_VERSION &lt; 50600) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$layer-&gt;open();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;getFeature($result-&gt;shapeindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} else {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape =
$layer-&gt;resultsGetShape($result-&gt;shapeindex,$result-&gt;tileindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;$results-&gt;bounds-&gt;minx
= $shape-&gt;bounds-&gt;minx; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;maxx = $shape-&gt;bounds-&gt;maxx; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;miny = $shape-&gt;bounds-&gt;miny; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;maxy = $shape-&gt;bounds-&gt;maxy; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - before loop&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;startTimer('calc_bounds');<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
for ($i = 1; $i &lt; $results-&gt;numresults; $i++) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$result = $layer-&gt;getResult($i);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (MAPSERVER_VERSION &lt; 50600) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;getFeature($result-&gt;shapeindex);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} else {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$shape = $layer-&gt;getShape( $result );<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($shape-&gt;bounds-&gt;minx &lt; $results-&gt;bounds-&gt;minx) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;minx = $shape-&gt;bounds-&gt;minx;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($shape-&gt;bounds-&gt;miny &lt; $results-&gt;bounds-&gt;miny) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;miny = $shape-&gt;bounds-&gt;miny;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($shape-&gt;bounds-&gt;maxx &gt; $results-&gt;bounds-&gt;maxx) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;maxx = $shape-&gt;bounds-&gt;maxx;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if ($shape-&gt;bounds-&gt;maxy &gt; $results-&gt;bounds-&gt;maxy) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$results-&gt;bounds-&gt;maxy = $shape-&gt;bounds-&gt;maxy;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
} <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;stopTimer('calc_bounds');<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - results-&gt;bounds-&gt; &quot;.
$results-&gt;bounds-&gt;minx.&quot;,
&quot;.$results-&gt;bounds-&gt;miny.&quot;,
&quot;.$results-&gt;bounds-&gt;maxx.&quot;, &quot;.$results-&gt;bounds-&gt;maxy
);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (MAPSERVER_VERSION &lt; 50600) {<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$layer-&gt;close();<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
}<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp;
$debug-&gt;log(__FUNCTION__.&quot; - at end&quot;.&quot; -
results-&gt;numresults = &quot;.$results-&gt;numresults);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp;&nbsp;&nbsp; return
$results;<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'>&nbsp; }<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=1 face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face="Comic Sans MS"><span
style='font-size:12.0pt;font-family:"Comic Sans MS";color:blue'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> mapserver-users-bounces@lists.osgeo.org
[mailto:mapserver-users-bounces@lists.osgeo.org] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Ben Thompson<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 10, 2011 11:06
AM<br>
<b><span style='font-weight:bold'>To:</span></b>
mapserver-users@lists.osgeo.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [mapserver-users] query
results lost</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Hello...we upgraded to the latest ms4w version 3.0.1 (MapServer and
MapScript to 5.6.6 )<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>and some things went bad. after doing a $oLayer-&gt;queryByPoint which
yields results (layer-&gt;numresults&gt;0), a call to $map_object-&gt;saveQuery
yields a file showing *no results*:<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>MapServer Query - Generated by msSaveQuery()<br>
1 1 33 -1<br>
10718763.8336106 3518854.14068547 -1 0<br>
-1 -1 -1 -1<br>
-1 -1 1<br>
NULL<br>
NULL<br>
-1<br>
0<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>so I rewrote our code to avoid using that...a php is loaded into an
iframe (frame.src=blablabla.php?xxx),&nbsp; in which the query results are
accesed via $map_object-&gt;$oMapSession-&gt;oMap...all layers have
-&gt;numresults=0<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>anyone have a clue as to what went bad? the code worked fine in an
older mapserver/mapscript...<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>thanks,<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Ben<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
&nbsp;<o:p></o:p></span></font></p>

</div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" noshade color="#aca899" align=center>

</span></font></div>

<p class=avgcert color="#000000"><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>No virus found in this message.<br>
Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>
Version: 10.0.1382 / Virus Database: 1513/3692 - Release Date: 06/10/11<o:p></o:p></span></font></p>

</div>

</body>

</html>