Hi,<br><br>I just wanted to update what solved my problem, it may help for somebody else. <br><br>I had given the substitution variable inside parentheses and it worked.<br><br><b>Not working :</b> EXPRESSION ([TOTPOP1] >= %V1% AND [TOTPOP1] < %V2%)<br>
<br><b>Working : </b>EXPRESSION ([TOTPOP1] >= (%V1%) AND [TOTPOP1] < (%V2%))<br><br>I am using ms4w (tested with version 3 and version 3.0.4 ) from <a href="http://maptools.org">maptools.org</a>. <br><br><div class="gmail_quote">
On Tue, Nov 22, 2011 at 8:56 PM, Lime, Steve D (DNR) <span dir="ltr"><<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm going to try a copy of the mapfile here and see what happens... Will report back later today.<br>
<span class="HOEnZb"><font color="#888888"><br>
Steve<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Jeff McKenna<br>
Sent: Tuesday, November 22, 2011 8:36 AM<br>
To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: Re: [mapserver-users] Problem with Variable Substitution for EXPRESSION<br>
<br>
Hello,<br>
<br>
If I was in your situation, I would follow Steve's advice and test it<br>
through the commandline (mapserv -nh QUERY_STRING="blah") to test your<br>
request in normal CGI mode.<br>
<br>
Then if all else fails, create a very small one layer mapfile with a<br>
tiny data file and package that with a requests.txt file, and submit<br>
that to the MapServer Issue Tracker, or event point to it here on the list.<br>
<br>
-jeff<br>
<br>
<br>
--<br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" target="_blank">http://www.gatewaygeomatics.com/</a><br>
<br>
<br>
<br>
<br>
On 11-11-22 5:25 AM, Prabu Raja wrote:<br>
> Hi Steve / Daniel,<br>
><br>
> I am using ms4w from <a href="http://maptools.org/ms4w/index.phtml" target="_blank">http://maptools.org/ms4w/index.phtml</a> in Windows 7.<br>
><br>
> Following is my map file content.<br>
><br>
> MAP<br>
> NAME ms_sql<br>
> IMAGECOLOR 255 255 255<br>
> # default output image dimensions<br>
> SIZE 256 256<br>
> # Is the map active? Sometimes you may wish to turn this off to<br>
> # use only the reference map or scale bar.<br>
> STATUS ON<br>
> CONFIG "MS_ERRORFILE" "\var\Map\error.txt"<br>
> DEBUG 0<br>
> # set top level projection<br>
> PROJECTION<br>
> "init=epsg:4326"<br>
> END<br>
> # image format options<br>
> OUTPUTFORMAT<br>
> NAME "png"<br>
> DRIVER AGG/PNG<br>
> MIMETYPE "image/png"<br>
> IMAGEMODE RGBA<br>
> EXTENSION "png"<br>
> TRANSPARENT ON<br>
> FORMATOPTION "GAMMA=0.75"<br>
> END<br>
> EXTENT -180 -90 180 90 # World<br>
><br>
> LAYER<br>
> VALIDATION<br>
> 'V1' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> 'V2' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> 'V3' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> 'V4' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> 'V5' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> 'V6' '^[-+]?[0-9]*\.?[0-9]+$'<br>
> END<br>
> NAME "state"<br>
> TYPE polygon<br>
> STATUS ON<br>
> CONNECTIONTYPE POSTGIS<br>
> CONNECTION "host=localhost dbname=pollutionmap user=***<br>
> password=*** port=5432"<br>
> DATA "wkb_geometry FROM (SELECT ogc_fid AS<br>
> oid, wkb_geometry, totpop1 FROM state_tst) AS SUBQUERY using unique oid"<br>
> PROCESSING "CLOSE_CONNECTION=DEFER"<br>
> CLASSITEM "totpop1"<br>
> OPACITY 100<br>
> CLASS<br>
> EXPRESSION ([TOTPOP1] >= %V1% AND [TOTPOP1] < %V2%)<br>
> STYLE<br>
> COLOR 255 108 118<br>
> OUTLINECOLOR 255 255 255<br>
> END<br>
> END<br>
> CLASS<br>
> EXPRESSION ([TOTPOP1] >= %V2% AND [TOTPOP1] < %V3%)<br>
> STYLE<br>
> COLOR 254 189 75<br>
> OUTLINECOLOR 255 255 255<br>
> END<br>
> END<br>
> CLASS<br>
> EXPRESSION ([TOTPOP1] >= %V3% AND [TOTPOP1] < %V4%)<br>
> STYLE<br>
> COLOR 254 247 46<br>
> OUTLINECOLOR 255 255 255<br>
> END<br>
> END<br>
> CLASS<br>
> EXPRESSION ([TOTPOP1] >= %V4% AND [TOTPOP1] < %V5%)<br>
> STYLE<br>
> COLOR 39 251 114<br>
> OUTLINECOLOR 255 255 255<br>
> END<br>
> END<br>
> CLASS<br>
> EXPRESSION ([TOTPOP1] >= %V5% AND [TOTPOP1] <= %V6%)<br>
> STYLE<br>
> COLOR 108 111 205<br>
> OUTLINECOLOR 255 255 255<br>
> END<br>
> END<br>
> END<br>
> END<br>
><br>
> Below are the url's through I am trying to generate map<br>
><br>
> <a href="http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650.45&V2=33288104.54&V3=66515558.222&V4=99743012.123&V5=132970466.455&V6=166197921.245" target="_blank">http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650.45&V2=33288104.54&V3=66515558.222&V4=99743012.123&V5=132970466.455&V6=166197921.245</a><br>
> <<a href="http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650.45&V2=33288104.54&V3=66515558.222&V4=99743012.123&V5=132970466.455&V6=166197921.245" target="_blank">http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650.45&V2=33288104.54&V3=66515558.222&V4=99743012.123&V5=132970466.455&V6=166197921.245</a>><br>
><br>
> <a href="http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650&V2=33288104&V3=66515558&V4=99743012&V5=132970466&V6=166197921" target="_blank">http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650&V2=33288104&V3=66515558&V4=99743012&V5=132970466&V6=166197921</a><br>
> <<a href="http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650&V2=33288104&V3=66515558&V4=99743012&V5=132970466&V6=166197921" target="_blank">http://localhost/fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650&V2=33288104&V3=66515558&V4=99743012&V5=132970466&V6=166197921</a>><br>
><br>
><br>
> Accessing through above 2 url gives '500 Internal Server Error'.<br>
> No error message in mapserver log.<br>
><br>
> Following error message logged in apache error log.<br>
> [warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid:<br>
> get overlap result error<br>
> [error] [client 127.0.0.1] Premature end of script headers: mapserv.exe<br>
><br>
> And following was logged in appache access log<br>
><br>
> GET<br>
> /fcgi-bin/mapserv.exe?map=/var/Map/State.map&layers=state&mode=map&V1=60650.45&V2=33288104.54&V3=66515558.222&V4=99743012.123&V5=132970466.455&V6=166197921.245<br>
> HTTP/1.1" 500 533<br>
><br>
><br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Prabu Raja<br><br>