[mapserver-users] PHP Mapscript GetLegendGraphic and GetFeatureInfo Problem

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Sep 30 06:19:59 PDT 2014


On 2014-09-30 10:02 AM, Stefan Carl wrote:
> Dear list,
> i use mapserver 6.4.1 with php Mapscript and i want to build a WMS which
> deals with Layers from a remote WMS. So i write a php-Script which
> creates a map object with all parameters.
> After building this php-Script at the webserver (/var/www/test) i can
> access the Service with a getCapabilities Request
> (...test.php?service=wms&version=1.1.1&request=getCapabilities) and the
> service works e.g. in QGIS 2.2.
> Then 2 problems appear:
> - if i want to get the legend of a Layer in QGIS 2.2 with the
> getLegendGraphic Request but it fails (server replies internal server error)
> - the getFeatureInfo response only serves the content type text/plain (i
> already changed wms_feature_info_mime_type to application/vnd.ogc.gml:
> nothing happens)
> I try to find out the problem by checking other clients like gvSIG and
> uDig but there the same problems appear. I build the wms with the same
> parameters with a Mapfile and the getLegendGraphic and getFeatureinfo
> Request work. I also compare the getCapabilities-Response of the service
> build by the php-file and the service build by the mapfile and both
> response-xml are equal.
> I think there is a problem in the php-file. Maybe it is a problem with
> sld-support  (related to the: getLegendGraphic problem) or gml-support
> (related to the: getFeatureInfo problem) but i'm not sure.
> I hope somebody can help me.
> Best regards
> Stefan

When I hit walls like this with WMS services, as painful as it may 
sound, I manually write the full request in the browser, and check the 
response there (if you have trouble writing all the parameters, you can 
check your Apache logs or QGIS logs for the full request).  That way you 
take out any other possible software problems (such as clients like QGIS).

-jeff



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










More information about the mapserver-users mailing list