Thanks, I tried as you suggested after reading the documentation WEB IMAGEPATH "/opt/test/static/ms_tmp" IMAGEURL "/media/ms_tmp/" METADATA ows_enable_request "*" END END # WEB
But I still get the same error. Thanks Mike On Thu, Oct 25, 2012 at 5:02 PM, Rahkonen Jukka <jukka.rahko...@mmmtike.fi>wrote: > Hi, > > Perhaps you have not added > "ows_enable_request" "*" > into your mapfile. Search and read the migration guide if this happens to > be the reason for the trouble. > > Mapserver web site should be updated at least. > > -Jukka Rahkonen- > > ________________________________ > Mike Stoddart wrote: > > > 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: > > > WMS server error. Invalid layer(s) given in the LAYERS parameter. > > > I can re-create the problem using Python MapScript and an example map > file from the MapServer website. The map file is: > > MAP > NAME "sample" > STATUS ON > SIZE 600 400 > > EXTENT -180 -90 180 90 > UNITS DD > > IMAGECOLOR 255 255 255 > FONTSET "/opt/test/conf/fonts.list" > > # > # Start of web interface definition > # > WEB > IMAGEPATH "/opt/test/static/ms_tmp" > IMAGEURL "/media/ms_tmp/" > END # WEB > > # > # Start of layer definitions > # > LAYER > NAME 'inline_circles' > TYPE CIRCLE > STATUS on > FEATURE > POINTS > 74.01 -53.8 > 110.7 -22.16 > END > END > CLASS > STYLE > COLOR 0 0 255 > END > END > END > > END # MAP > > If I use the following Python: > > import mapscript > f = "<path to map file>" > m = mapscript.mapObj(f) > r = mapscript.OWSRequest() > r.setParameter('LAYERS', 'inline_circle') > m.loadOWSParameters(r) > > I get: > > ... > <ServiceExceptionReport version="1.1.1"> > <ServiceException code="LayerNotDefined"> > msWMSLoadGetMapParams(): WMS server error. Invalid layer(s) given in the > LAYERS parameter. > </ServiceException> > </ServiceExceptionReport> > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib64/python2.7/site-packages/mapscript.py", line 1623, in > loadOWSParameters > def loadOWSParameters(*args): return > _mapscript.mapObj_loadOWSParameters(*args) > _mapscript.MapServerError: msWMSLoadGetMapParams(): WMS server error. > Invalid layer(s) given in the LAYERS parameter. > > > So it doesn't think the layer exists. If I check the layer's status: > > m.getLayer(0).status > 0 > > 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? > > Thanks > Mike > >
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users