I'm using MapServer 6.0.1 on Fedora 16 and I'm having a weird layer issue. We're trying to port our application from MapServer 5 -> 6 and we're seeing the error:<div><br></div><div>WMS server error. Invalid layer(s) given in the LAYERS parameter.</div>
<div><br></div><div>I can re-create the problem using Python MapScript and an example map file from the MapServer website. The map file is:</div><div><br></div><div><div>MAP</div><div>    NAME "sample"</div><div>
    STATUS ON</div><div>    SIZE 600 400</div><div><br></div><div>    EXTENT -180 -90 180 90</div><div>    UNITS DD</div><div><br></div><div>    IMAGECOLOR 255 255 255</div><div>    FONTSET        "/opt/test/conf/fonts.list"</div>
<div><br></div><div>    #</div><div>    # Start of web interface definition</div><div>    #</div><div>    WEB</div><div>        IMAGEPATH "/opt/test/static/ms_tmp"</div><div>        IMAGEURL  "/media/ms_tmp/"</div>
<div>    END # WEB</div><div><br></div><div>    #</div><div>    # Start of layer definitions</div><div>    #</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>LAYER</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  NAME 'inline_circles'</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>  TYPE CIRCLE</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  STATUS on</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>  FEATURE</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>    POINTS</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>      74.01 -53.8</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>      110.7 -22.16</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>    END</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>  END</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  CLASS</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>    STYLE</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>      COLOR 0 0 255</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>    END</div>
<div><span class="Apple-tab-span" style="white-space:pre">      </span>  END</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>END</div><div><br></div><div>END # MAP</div></div><div><br></div><div>If I use the following Python:</div>
<div><br></div><div>import mapscript</div><div>f = "<path to map file>"</div><div>m = mapscript.mapObj(f)</div><div>r = mapscript.OWSRequest()</div><div>r.setParameter('LAYERS', 'inline_circle')</div>
<div>m.loadOWSParameters(r)</div><div><br></div><div>I get:</div><div><br></div><div>...</div><div><div><ServiceExceptionReport version="1.1.1"></div><div><ServiceException code="LayerNotDefined"></div>
<div>msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the LAYERS parameter.</div><div></ServiceException></div><div></ServiceExceptionReport></div><div>Traceback (most recent call last):</div>
<div>  File "<stdin>", line 1, in <module></div><div>  File "/usr/lib64/python2.7/site-packages/mapscript.py", line 1623, in loadOWSParameters</div><div>    def loadOWSParameters(*args): return _mapscript.mapObj_loadOWSParameters(*args)</div>
<div>_mapscript.MapServerError: msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the LAYERS parameter.</div></div><div><br></div><div><br></div><div>So it doesn't think the layer exists. If I check the layer's status:</div>
<div><br></div><div><div>m.getLayer(0).status</div><div>0</div></div><div><br></div><div>The layer is disabled? So I'm assuming something is amiss in my map file but I just can't see it. Am I missing something obvious?</div>
<div><br></div><div>Thanks</div><div>Mike</div><div><br></div>