Hi Steve / Daniel,<div><br></div><div>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.</div><div><br></div><div>Following is my map file content. </div>
<div><br></div><div><div>MAP</div><div><span style="white-space:pre-wrap">        </span>NAME ms_sql</div><div><span style="white-space:pre-wrap">        </span>IMAGECOLOR 255 255 255</div><div><span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap">        </span># default output image dimensions</div><div><span style="white-space:pre-wrap">        </span>SIZE 256 256</div><div><span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap">        </span># Is the map active? Sometimes you may wish to turn this off to </div><div><span style="white-space:pre-wrap">        </span># use only the reference map or scale bar.</div>
<div><span style="white-space:pre-wrap">        </span>STATUS ON</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>CONFIG "MS_ERRORFILE" "\var\Map\error.txt"</div>
<div><span style="white-space:pre-wrap">        </span>DEBUG 0</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span># set top level projection</div>
<div><span style="white-space:pre-wrap">        </span>PROJECTION</div><div><span style="white-space:pre-wrap">                </span>"init=epsg:4326"</div><div><span style="white-space:pre-wrap">        </span>END</div>
<div><span style="white-space:pre-wrap">        </span># image format options</div><div><span style="white-space:pre-wrap">        </span>OUTPUTFORMAT</div><div><span style="white-space:pre-wrap">        </span> NAME "png"</div>
<div><span style="white-space:pre-wrap">        </span> DRIVER AGG/PNG</div><div> MIMETYPE "image/png"</div><div> IMAGEMODE RGBA</div><div> EXTENSION "png"</div><div><span style="white-space:pre-wrap">        </span> TRANSPARENT ON</div>
<div> FORMATOPTION "GAMMA=0.75"</div><div> END</div><div><span style="white-space:pre-wrap">        </span>EXTENT -180 -90 180 90 # World</div><div><br></div><div> LAYER </div><div> VALIDATION</div>
<div><span style="white-space:pre-wrap">        </span> 'V1' '^[-+]?[0-9]*\.?[0-9]+$'</div><div><span style="white-space:pre-wrap">        </span> 'V2' '^[-+]?[0-9]*\.?[0-9]+$'</div>
<div><span style="white-space:pre-wrap">        </span> 'V3' '^[-+]?[0-9]*\.?[0-9]+$'</div><div><span style="white-space:pre-wrap">        </span> 'V4' '^[-+]?[0-9]*\.?[0-9]+$'</div>
<div><span style="white-space:pre-wrap">        </span> 'V5' '^[-+]?[0-9]*\.?[0-9]+$'</div><div><span style="white-space:pre-wrap">        </span> 'V6' '^[-+]?[0-9]*\.?[0-9]+$'</div>
<div> END</div><div> NAME "state" </div><div> TYPE polygon</div><div> STATUS ON </div><div> CONNECTIONTYPE POSTGIS</div><div> CONNECTION "host=localhost dbname=pollutionmap user=*** password=*** port=5432"<span style="white-space:pre-wrap">                </span></div>
<div> DATA "wkb_geometry FROM (SELECT ogc_fid AS oid, wkb_geometry, totpop1 FROM state_tst) AS SUBQUERY using unique oid"</div><div> PROCESSING "CLOSE_CONNECTION=DEFER"</div><div> CLASSITEM "totpop1"</div>
<div> OPACITY 100</div><div> CLASS </div><div> EXPRESSION ([TOTPOP1] >= %V1% AND [TOTPOP1] < %V2%)</div><div> STYLE </div><div> COLOR 255 108 118</div><div> OUTLINECOLOR 255 255 255</div>
<div> END </div><div> END</div><div> CLASS</div><div> EXPRESSION ([TOTPOP1] >= %V2% AND [TOTPOP1] < %V3%)</div><div> STYLE </div><div> COLOR 254 189 75</div><div> OUTLINECOLOR 255 255 255</div>
<div> END </div><div> END</div><div> CLASS<span style="white-space:pre-wrap">                                        </span></div><div> EXPRESSION ([TOTPOP1] >= %V3% AND [TOTPOP1] < %V4%)</div><div> STYLE </div>
<div> COLOR 254 247 46 </div><div> OUTLINECOLOR 255 255 255</div><div> END </div><div> END</div><div> CLASS<span style="white-space:pre-wrap">                                        </span></div><div>
EXPRESSION ([TOTPOP1] >= %V4% AND [TOTPOP1] < %V5%)</div><div> STYLE </div><div> COLOR 39 251 114</div><div> OUTLINECOLOR 255 255 255</div><div> END </div><div> END</div>
<div> CLASS<span style="white-space:pre-wrap">                                        </span></div><div> EXPRESSION ([TOTPOP1] >= %V5% AND [TOTPOP1] <= %V6%)</div><div> STYLE </div><div> COLOR 108 111 205</div>
<div> OUTLINECOLOR 255 255 255</div><div> END </div><div> END</div><div> END</div><div>END</div><div><br></div><div>Below are the url's through I am trying to generate map</div><div><br></div>
<div><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></div>
<div><br></div><div><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></div>
<div><br></div><div><br></div><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Accessing through above 2 url gives '500 Internal Server Error'.</span></div>
<div><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">No error message in mapserver log.</span></div><div><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</span></div><div><span style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Following error message logged in apache error log.</span></div>
<div><span style="background-color:rgb(255,255,255)"><div style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">[warn] [client 127.0.0.1] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error</div>
<div style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">[error] [client 127.0.0.1] Premature end of script headers: mapserv.exe</div><div style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">
<br></div><div style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">And following was logged in appache access log</div><div style="font-family:Verdana,Geneva,Helvetica,Arial,sans-serif;font-size:13px">
<br></div><div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif">GET /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 HTTP/1.1" 500 533</font></div>
</span></div><div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif"><br></font></div><div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif"><br></font></div>
<div><font face="Verdana, Geneva, Helvetica, Arial, sans-serif"><br></font><div class="gmail_quote">On Wed, Nov 16, 2011 at 9:14 PM, Daniel Morissette <span dir="ltr"><<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Which binaries are you using?<br>
<br>
If you your own custom build then are you sure it's not a case of multiple versions of REGEX on the same system? That used to be a problem in the old days with PHP's local copy of regex conflicting with the system regex, but I don't think that is a problem any more though.<div>
<div><br>
<br>
<br>
On 11-11-16 10:40 AM, Lime, Steve D (DNR) wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Well, that’s not good is it. Hmmm… I ran a quick test here using this<br>
mapfile:<br>
<br>
MAP<br>
<br>
NAME 'test'<br>
<br>
SIZE 450 600<br>
<br>
EXTENT 125000 4785000 788000 5489000<br>
<br>
IMAGETYPE PNG8<br>
<br>
LAYER<br>
<br>
VALIDATION<br>
<br>
'area' '^[-+]?[0-9]*\.?[0-9]+$'<br>
<br>
END<br>
<br>
NAME 'county'<br>
<br>
STATUS DEFAULT<br>
<br>
TYPE POLYGON<br>
<br>
DATA ' bdry_counpy2'<br>
<br>
CLASS<br>
<br>
EXPRESSION ([area] > %area%)<br>
<br>
STYLE COLOR 212 212 212 OUTLINECOLOR 0 0 0 END<br>
<br>
END<br>
<br>
END<br>
<br>
END<br>
<br>
This is against 6.0 latest trunk although I don’t think there have been<br>
any changes in that area…<br>
<br>
I can run something like:<br>
<br>
mapserv -nh "QUERY_STRING=map=test.map&<u></u>mode=map&area=500000000" > test.png<br>
<br>
If ‘area’ parameter is provided as a non-double then the substitution<br>
isn’t done. I believe the substitution validation errors fail silently.<br>
This example works, how different is what you’re doing?<br>
<br>
Steve<br>
<br></div></div>
*From:*Prabu Raja [mailto:<a href="mailto:prab.raja@gmail.com" target="_blank">prab.raja@gmail.com</a>]<br>
*Sent:* Wednesday, November 16, 2011 5:16 AM<br>
*To:* Lime, Steve D (DNR)<br>
*Cc:* <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
*Subject:* Re: [mapserver-users] Problem with Variable Substitution for<div><br>
EXPRESSION<br>
<br>
Thanks Steve.<br>
<br>
Tried the following regular expression<br>
<br>
"[-+]?[0-9]*\.?[0-9]+".<br>
<br>
For which the internal server error is coming from Apache. No error<br>
logged in mapserver log.<br>
<br>
<br>
"Internal Server Error<br>
<br>
The server encountered an internal error or misconfiguration and was<br></div>
unable to complete your request.*"*<div><br>
<br>
On Tue, Nov 15, 2011 at 8:37 PM, Lime, Steve D (DNR)<br></div><div>
<<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a> <mailto:<a href="mailto:Steve.Lime@state.mn.us" target="_blank">Steve.Lime@state.mn.us</a><u></u>>> wrote:<br>
<br>
See <a href="http://www.regular-expressions.info/floatingpoint.html" target="_blank">http://www.regular-<u></u>expressions.info/<u></u>floatingpoint.html</a> for some good<br>
examples.<br>
<br>
Steve<br>
<br></div>
*From:*<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-<u></u>bounces@lists.osgeo.org</a><br>
<mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-<u></u>bounces@lists.osgeo.org</a>><br>
[mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-<u></u>bounces@lists.osgeo.org</a><br>
<mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-<u></u>bounces@lists.osgeo.org</a>>] *On Behalf Of *Prabu Raja<br>
*Sent:* Tuesday, November 15, 2011 4:29 AM<br>
*To:* <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.<u></u>osgeo.org</a>><br>
*Subject:* [mapserver-users] Problem with Variable Substitution for<div><br>
EXPRESSION<br>
<br>
Hi,<br>
<br>
I need to compare one attribute from database table in "EXPRESSION"<br>
(under "LAYER") with six different values passed as Variable<br>
Substitution for coloring the layer.<br>
<br>
I did added validation for those variables in the map file, but for some<br>
reason I am getting the below error.<br>
<br></div>
*msValidateParameter(): Regular expression error. Parameter pattern<br>
validation failed.*<br>
<br>
*msEvalRegex(): Regular expression error. String failed expression test.*<br>
<br>
*msValidateParameter(): Regular expression error. Parameter pattern<br>
validation failed.*<div><div><br>
<br>
Could anyone help me with where I am wrong? Below is the map file<br>
content for this layer.<br>
<br>
All the six variables would be numbers (may be a decimal number), Is my<br>
regular expression correct?<br>
<br>
WEB<br>
<br>
VALIDATION<br>
<br>
value_one "^[\d+(\.\d)]*$"<br>
<br>
value_two "^[\d+(\.\d)]*$"<br>
<br>
value_three "[^\d+(\.\d)]*$"<br>
<br>
value_four "[^\d+(\.\d)]*$"<br>
<br>
value_five "[^\d+(\.\d)]*$"<br>
<br>
value_six "[^\d+(\.\d)]*$"<br>
<br>
END<br>
<br>
END<br>
<br>
<br>
LAYER<br>
<br>
NAME "state"<br>
<br>
TYPE polygon<br>
<br>
STATUS ON<br>
<br>
CONNECTIONTYPE POSTGIS<br>
<br>
CONNECTION "user=postgres password=****** dbname=shpdb host=localhost<br>
port=5432"<br>
<br>
DATA "the_geom FROM (SELECT gid, the_geom, totpop1 FROM state_shape) AS<br>
SUBQUERY using unique gid"<br>
<br>
PROCESSING "CLOSE_CONNECTION=DEFER"<br>
<br>
CLASSITEM "totpop1"<br>
<br>
OPACITY 100<br>
<br>
CLASS<br>
<br>
EXPRESSION ([TOTPOP1] >= %value_one% AND [TOTPOP1] < %value_two%)<br>
<br>
STYLE<br>
<br>
COLOR 255 108 118<br>
<br>
OUTLINECOLOR 255 255 255<br>
<br>
END<br>
<br>
END<br>
<br>
CLASS<br>
<br>
EXPRESSION ([TOTPOP1] >= %value_two% AND [TOTPOP1] < %value_three%)<br>
<br>
STYLE<br>
<br>
COLOR 254 189 75<br>
<br>
OUTLINECOLOR 255 255 255<br>
<br>
END<br>
<br>
END<br>
<br>
CLASS<br>
<br>
EXPRESSION ([TOTPOP1] >= %value_three% AND [TOTPOP1] < %value_four%)<br>
<br>
STYLE<br>
<br>
COLOR 254 247 46<br>
<br>
OUTLINECOLOR 255 255 255<br>
<br>
END<br>
<br>
END<br>
<br>
CLASS<br>
<br>
EXPRESSION ([TOTPOP1] >= %value_four% AND [TOTPOP1] < %value_five%)<br>
<br>
STYLE<br>
<br>
COLOR 39 251 114<br>
<br>
OUTLINECOLOR 255 255 255<br>
<br>
END<br>
<br>
END<br>
<br>
CLASS<br>
<br>
EXPRESSION ([TOTPOP1] >= %value_five% AND [TOTPOP1] <= %value_six%)<br>
<br>
STYLE<br>
<br>
COLOR 108 111 205<br>
<br>
OUTLINECOLOR 255 255 255<br>
<br>
END<br>
<br>
END<br>
<br>
END<br>
<br>
--<br>
Regards,<br>
Prabu Raja<br>
<br>
<br>
<br>
--<br>
Regards,<br>
Prabu Raja<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a><span><font color="#888888"><br>
</font></span></blockquote><span><font color="#888888">
<br>
<br>
-- <br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000<br>
<br>
______________________________<u></u>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Prabu Raja<br><br>
</div>