Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-11 Thread Leehan
problem solved.
Indeed, at least wms_onlineressource was not correct : the file mentionned
was not existing any more or  the path was wrong.
Thanks a lot



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807p5302954.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-11 Thread Rahkonen Jukka (MML)
Hi,

Your screen capture of the error message is rather useless because I can't read 
the texts. Instead of image, copy or rewrite the texts. The easier you make it 
the better possibilities that somebody tries to help you.

-Jukka Rahkonen-


-Alkuperäinen viesti-
Leehan wrote:
Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

The mapfile is on a computer with windows server and ms4w.
There is no problem to display the layer with Qgis on the server.
Problem happens from distant computer, there I get 
<http://osgeo-org.1560.x6.nabble.com/file/n5302916/Capture.png>
weird...

I will try jeff and Junka solutions as well.
Thanks 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807p5302916.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-11 Thread Leehan
The mapfile is on a computer with windows server and ms4w.
There is no problem to display the layer with Qgis on the server.
Problem happens from distant computer, there I get 
 
weird...

I will try jeff and Junka solutions as well.
Thanks 



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807p5302916.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-10 Thread Leehan
jratike80 wrote
> Hi,
> 
> Have a look at the access.log and check what request QGIS has sent. And
> even 10.210.1.32 does not seem to be open to internet it is not a good
> habit to reveal your passwords in mailing lists. I suggest to change that
> password everywhere you are using it.
> 
> Another thing to check is if the "wms_onlineresource" is correct for just
> this mapfile. QGIS is using the advertised URL for GetMaps if you do not
> select "Ignore GetMap/GetTile URI reported in capabilities". Is this your
> current mapfile or the one that you copied?
> 
> http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/map/prescr_test.map
> 
> -Jukka Rahkonen-

When it failed with my complete mapfile, I just created and tested the
mapfile I have pasted here. So this one is not my current mapfile. And in
both cases, the error is the same :P
In my complete mapfile, all works fine (layers from postgis and request
enabled) but this layer doesn't.

___
mapserver-users mailing list
mapserver-users@.osgeo
http://lists.osgeo.org/mailman/listinfo/mapserver-users





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807p5302824.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-10 Thread Jeff McKenna

On 2017-01-10 11:25 AM, Leehan wrote:


I have a correct image in Firefox. But in QGIS I can't get anything, it says


For issues with QGIS and WMS layers, the first thing I do is get the 
exact request used by QGIS, and then examine that request (you can see a 
similar response by me on this in the archives, with specific steps to 
debug with QGIS: 
https://lists.osgeo.org/pipermail/mapserver-users/2016-September/079316.html).


-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/







___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-10 Thread Rahkonen Jukka (MML)
Hi,

Have a look at the access.log and check what request QGIS has sent. And even 
10.210.1.32 does not seem to be open to internet it is not a good habit to 
reveal your passwords in mailing lists. I suggest to change that password 
everywhere you are using it.

Another thing to check is if the "wms_onlineresource" is correct for just this 
mapfile. QGIS is using the advertised URL for GetMaps if you do not select 
"Ignore GetMap/GetTile URI reported in capabilities". Is this your current 
mapfile or the one that you copied?

http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/map/prescr_test.map

-Jukka Rahkonen-


Leehan wrote:
[mapserver-users] wms/ows_enabe request and invalid layer and Qgis

Hi,

Here's my map file :

MAP
NAME "Mapserver"
FONTSET "./fonts/fonts.txt"
OUTPUTFORMAT
NAME "png"
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
END #fin format

EXTENT 679286.0 6153539.5 679580.0 6153724.6 #xmin ymin xmax ymax
UNITS METERS
DEBUG 5
CONFIG "CPL_DEBUG" "ON"
CONFIG "PROJ_DEBUG" "ON"
CONFIG MS_ERRORFILE "C:/ms4w/errorMapFile.txt"

PROJECTION # proj de sortie
"init=epsg:2154"
END

WEB 
METADATA
"wms_title" "WMS, aide au montage des opérations"
"wms_onlineresource"
"

http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/map/prescr_test.map;
"wms_enable_request" "*" #active les getcapabilities, 
getmap, getfeatureinfo, getfeature
"wms_srs" "EPSG:2154 EPSG:3857 EPSG:900913"
"wms_encoding" "UTF-8"
END #fin metadata
END #end web

LAYER
NAME "prescriptions"
#STATUS ON
TYPE POLYGON
PROJECTION
"init=epsg:2154"
END #fin projection
CONNECTIONTYPE POSTGIS
CONNECTION "host=10.210.1.32 dbname=activite user=PostGIS
password=CAVIAR2016 port=5432"
DATA "geom from (select gid, geom, numope, numprescr, annee, nomope, 
ro, typope from activite.prescription) as foo using unique gid SRID=2154"
PROCESSING "CLOSE_CONNECTION=DEFER"
MAXSCALEDENOM 8
LABELITEM "numprescr"
CLASS
NAME "prescriptions"
STYLE
COLOR 200 125 0
OPACITY 50
OUTLINECOLOR 200 125 0
WIDTH 1
LINECAP round
END #end Style
LABEL
FONT "verdana"
SIZE 4
COLOR 0 0 0
OUTLINECOLOR 255 255 255
OUTLINEWIDTH 1
POSITION auto #uc
MAXSCALEDENOM 8
TYPE truetype
END #fin label
TEMPLATE "bidon.html"   
END #fin class
METADATA
"gml_include_items" "all"
"wms_title" "prescriptions"
#"wms_srs" "EPSG:2154"
END #fin metadata prescriptions
END #fin layer prescriptions

END

I have a correct image in Firefox. But in QGIS I can't get anything, it says
: 


msWMSLoadGetMapParams(): WMS server error. Invalid 
layer(s) given in the LAYERS parameter. A layer might be disabled for this 
request. Check wms/ows_enable_request settings.

Layer name is right. 
Besides this layer is just a copy of another one working perfectly, with the 
request available ! So I can't figure out the reason why I can't display this 
layer.
Any idea ?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

[mapserver-users] wms/ows_enabe request and invalid layer and Qgis

2017-01-10 Thread Leehan
Hi,

Here's my map file :

MAP
NAME "Mapserver"
FONTSET "./fonts/fonts.txt"
OUTPUTFORMAT
NAME "png"
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGB
END #fin format

EXTENT 679286.0 6153539.5 679580.0 6153724.6 #xmin ymin xmax ymax
UNITS METERS
DEBUG 5
CONFIG "CPL_DEBUG" "ON"
CONFIG "PROJ_DEBUG" "ON"
CONFIG MS_ERRORFILE "C:/ms4w/errorMapFile.txt"

PROJECTION # proj de sortie
"init=epsg:2154"
END

WEB 
METADATA
"wms_title" "WMS, aide au montage des opérations"
"wms_onlineresource"
"http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=C:/ms4w/map/prescr_test.map;
"wms_enable_request" "*" #active les getcapabilities, 
getmap,
getfeatureinfo, getfeature
"wms_srs" "EPSG:2154 EPSG:3857 EPSG:900913"
"wms_encoding" "UTF-8"
END #fin metadata
END #end web

LAYER
NAME "prescriptions"
#STATUS ON
TYPE POLYGON
PROJECTION
"init=epsg:2154"
END #fin projection
CONNECTIONTYPE POSTGIS
CONNECTION "host=10.210.1.32 dbname=activite user=PostGIS
password=CAVIAR2016 port=5432"
DATA "geom from (select gid, geom, numope, numprescr, annee, nomope, ro,
typope from activite.prescription) as foo using unique gid SRID=2154"
PROCESSING "CLOSE_CONNECTION=DEFER"
MAXSCALEDENOM 8
LABELITEM "numprescr"
CLASS
NAME "prescriptions"
STYLE
COLOR 200 125 0
OPACITY 50
OUTLINECOLOR 200 125 0
WIDTH 1
LINECAP round
END #end Style
LABEL
FONT "verdana"
SIZE 4
COLOR 0 0 0
OUTLINECOLOR 255 255 255
OUTLINEWIDTH 1
POSITION auto #uc
MAXSCALEDENOM 8
TYPE truetype
END #fin label
TEMPLATE "bidon.html"   
END #fin class
METADATA
"gml_include_items" "all"
"wms_title" "prescriptions"
#"wms_srs" "EPSG:2154"
END #fin metadata prescriptions
END #fin layer prescriptions

END

I have a correct image in Firefox. But in QGIS I can't get anything, it says
: 


msWMSLoadGetMapParams(): WMS server error. Invalid 
layer(s) given in the
LAYERS parameter. A layer might be disabled for this request. Check
wms/ows_enable_request settings.

Layer name is right. 
Besides this layer is just a copy of another one working perfectly, with the
request available ! So I can't figure out the reason why I can't display
this layer.
Any idea ?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/wms-ows-enabe-request-and-invalid-layer-and-Qgis-tp5302807.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users