<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr"><span style="color: rgb(68, 68, 68); font-size: 15px; line-height: 21px;">Hello,</span><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><br></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">I need help with using RegEx for Tileset Dimensions in my mapcache configuration file. </div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">I used the example given in mapcache.xml.sample and I get following error:</div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><br></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">Syntax error on line 429 of httpd.conf:</div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">failed to compile regular expression "<span style="line-height: 1.2em; color: rgb(34, 34, 34); font-size: 12pt;">^(?!.*\.\.)[a-zA-Z0-9\./]*\.map$" </span><span style="line-height: 22px; font-size: 12pt;">for dimension "mapfile": Invalid preceding regular expression</span></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><br></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><span style="line-height: 1.2em; font-size: 12pt;">Here is the relevant portion of my mapcache.xml</span></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><span style="line-height: 1.2em; font-style: italic; font-size: 12pt;"><br style="line-height: 22px;"></span></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;"><source name="dynamicMap" type="wms"></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <getmap></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">         <params></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">            <MAP>/path/dynamic.map</MAP></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">            <VERSION>1.1.1</VERSION></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">            <FORMAT>image/png</FORMAT></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">            <LAYERS>InlineData</LAYERS></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">            <SRS>EPSG:3857</SRS></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">         </params></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      </getmap>      </i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <http></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">         <url>http://hostname/cgi-bin/mapserv?</url></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      </http></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">   </source></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;"><br></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">   <tileset name="gisMaps"></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <source>dynamicMap</source></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <cache>disk</cache></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <grid>g</grid></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <format>PNG</format></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <metatile>5 5</metatile></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <metabuffer>10</metabuffer></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <expires>3600</expires></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      <dimensions></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">        #<dimension type="values" name="userId" default="user">user1</dimension> </i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">        #<dimension type="values" name="ownerId" default="owner">owner1</dimension></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">        <dimension type="regex" name="mapfile" default="/path/dynamic.map">^(?!.*\.\.)[a-zA-Z0-9\./]*\.map$</dimension></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">      </dimensions></i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">        </i></span></div><div><span style="line-height: 19.1875px;"><i style="line-height: 21px;">   </tileset></i></span></div><div style="line-height: 1.2em; font-size: 12pt; font-style: italic;"><br style="line-height: 22px;"></div></div><div style="color: rgb(68, 68, 68); font-size: 12pt; font-style: italic;"><div style="font-style: normal;"><span style="line-height: 22px;">Do I need to change something in the httpd.conf file, or my mapfile, or the way mapserver/mapcache was compiled?</span></div><div style="font-style: normal;"><span style="line-height: 22px;"><br></span></div><div style="line-height: normal; font-style: normal;"><span style="line-height: 22px; font-size: 12pt;">Besides specifying dynamic mapfiles, I would also like to use the regex dimension (instead of values dimension) for creating additional folders in the mapcache folder hirearchy. Is this possible?</span></div><div style="line-height: normal; font-style: normal;"><span style="line-height: 22px; font-size: 12pt;"><br></span></div><div style="line-height: normal; font-style: normal;"><span style="line-height: 22px; font-size: 12pt;">e.g. /mapcache/tileset/grid/ownerid/userid/</span><span style="line-height: 1.2em; font-style: italic; font-size: 12pt;">xx/xx/xx/xx/xx/xx.png</span></div></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><br></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">Any suggestions/comments appreciated. I'm using mapserver v 6.2 on a unix machine.</div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;"><br></div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">Thanks,</div><div style="line-height: 21px; color: rgb(68, 68, 68); font-size: 15px;">Shruti</div></div>
                                          </div></body>
</html>