Re: [mapserver-users] Passing single quoted strings
On Mittwoch, 22. April 2009 18:07:11 you wrote: I've tested teh scenario with 3 different filter strings and attached the mapserver error logs with DEBUG 5 (in case need be). The resulting URL strings are taken from apache access log file. Please let me know if you need the full URL. Thanks and Regards Heiko The OL call: sacurabiglayer = new OpenLayers.Layer.WMS( SACURABIG, http://kahlo1/cgi-bin/mapserv;, {map:'/home/schroete/sciadaten/MapServer/country98/heiko5.map', layers: sacura_big, map.layer[SACURABIG]: somevalue, transparent: true}, {singleTile:true, isBaseLayer: false, buffer:5, wrapDateLine: true, queryable: true}); Setting of the string in OL: somevalue = filter +'+ datum between +'+2002-8-8+'+ and +'+ 2002-8-9 +''; Results: MAP.LAYER%5BSACURABIG%5D=filter%20'%20datum%20between%20'2002-8-8'%20and%20'%202002-8-9%20'' (ms_error_assembled_string.txt) Setting of the string in OL: somevalue = filter 'datum between '2002-8-8' and '2002-8-9' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'2002-8-9'%20' (ms_error_unescaped_string.txt) Setting of the string in OL: somevalue = filter 'datum between \'2002-8-8\' and \'2002-8-9\' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'2002-8-9'%20' (ms_error_escaped_single_quotes.txt) The Mapfile Layer definition: LAYER CONNECTIONTYPE POSTGIS NAME SACURABIG PROCESSING CLOSE_CONNECTION=DEFER OPACITY 60 STATUS ON METADATA wms_title sacurabig layer wms_srs init=epsg:4326 END PROJECTION init=epsg:4326 END CONNECTION user=fei password=foo dbname=fum host=kahlo1 DATA geocenter from sacura_big VALIDATION 'filter' ^.# Just for testing END FILTER orbitnr=0 TYPE POINT SIZEUNITS meters CLASS NAME sacura_big_class STYLE COLOR [farbe] SYMBOL circle SIZE 35000 END END END # Layer What does the URL OL generate look like? I'm curious how it escapes the text for the URL. That should give us a hint. Steve Heiko Schröter schro...@iup.physik.uni-bremen.de 04/21/09 1:53 AM Hello, i have to pass single quoted strings from Open Layer through mapserver to a postgis/postgres database. i.e. filter 'value=1 and datum between '2005-1-1' and '2005-1-3' ; The postgres db expects (afaik) the date in a single quoted string. The problem is that mapserver stops scanning the filter string when coming across the second single quote and bails out. The Validation string in the mapfile: VALIDATION 'filter' ^. END Even when allowing single quotes explicitly by inserting escaped single quotes in the validation string it doesn't work. Escaping the single quotes in the assembled OL string won't help either. Does anyone has an idea of how to pass such strings through mapserver ? Now i do use an ugly hack of converting the date to abstime on the client side (with all the UTC converting hassle) and pass the integer to the db. i.e. filter 'value = 1 and abstime between +fromDate+ and +toDate+'; MapServer version 5.4.0-rc1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE Thanks and Regards Heiko ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users [Thu Apr 23 09:25:11 2009].502057 loadLayer(): Unknown identifier. Parsing error near (2002):(line 1) [Thu Apr 23 09:25:11 2009].465405 msDrawMap(): Layer 8 (COPYRIGHT), 0.000s [Thu Apr 23 09:25:11 2009].465929 msDrawMap(): Drawing Label Cache, 0.000s [Thu Apr 23 09:25:11 2009].465955 msDrawMap() total time: 0.013s [Thu Apr 23 09:25:11 2009].526054 msSaveImage() total time: 0.060s [Thu Apr 23 09:25:11 2009].526300 mapserv request processing time (msLoadMap not incl.): 0.075s [Thu Apr 23 09:25:11 2009].526319 msFreeMap(): freeing map at 0x24b04c0. [Thu Apr 23 09:25:11 2009].989454 loadLayer(): Unknown identifier. Parsing error near (2002):(line 1) [Thu Apr 23 09:25:11 2009].733446 msDrawMap(): Layer 0 (KARTE), 0.161s [Thu Apr 23 09:25:11 2009].770097
Re: [mapserver-users] msEvalRegex problem (Mapserver 5.2.2)
Hi Steve, hello Daniel this was indeed the issue I encountered. Thanks very much for the fast reply. I'm now even able to run MS 5.4.0 final on our test system. IMHO the suggested fix should make it into the 5.4.1 release. For the time being I will tweak our Fusion (1.06) Query.php. AFAIK the Fusion 2.0 beta also uses query.qry. I'm not aware of any other extensions out there. Thanks, again and best regards Dominik On 22.04.2009, at 17:30, Steve Lime wrote: Hi Dominik: The extension for queryfiles should be .qy not .qry. The .qy is what the CGI writes. I missed the fact the mapscript allows the user to specify their own extension. Versions 5.2.2 and up enforce that. Argh... How to fix. Couple of options: - tweak fusion to write queries using .qy as an extension - tweak MapServer to recognize .qry as a legitimate extension To do the later you can edit mapquery.c, line 127 and change: if(msEvalRegex(\\.qy$, filename) != MS_TRUE) return MS_FAILURE; to: if(msEvalRegex(\\.(qy|qry)$, filename) != MS_TRUE) return MS_FAILURE; If I knew there were a couple of common extensions being used out there I could update this pattern in 5.4.1. Steve Dominik Schmid dominik.sch...@ilu.ch 04/22/09 10:14 AM Hi list once again I have to turn to the list as a last resort after having depleted all possible solutions which I've come across. We're running Mapserver/PHP/Mapscript/Fusion on a CentOS installation which we've recently upgraded to 5.3. The upgrade has so far been successful except for one problem: When I compile Mapserver 5.2.2 or 5.4.0RC2 (with mapscript support) against the updated libraries etc. the resulting mapserv works fine (as far as tested) except when I select a feature (through the Fusion web map application, all data is pulled from the postgres database) it throws an error like: msEvalRegex(): Regular expression error. String (/var/lib/php/session/ sess_49ef23ad8b84e/query.qry) failed expression test. If I compile Mapserver 5.2.0 on the same upgraded system this works fine as it had before on the original system (Centos 4.4). I always used the correct php_mapscript.so and did a proper httpd restart. Originally I had GDAL 1.4 compiled on the system, tried with removal and changing to the EPEL-Version (1.4.2) and after further failure tried with removal (also removing librx) and compiling GDAL 1.6.0 from source which didn't change a thing. I did this after reading some threads on this list ( http://lists.osgeo.org/pipermail/mapserver-users/2008-April/055638.html ). Some more version details: - php 5.2.6 (from the C5-testing repo) - postgresql 8.2.9 (from the C5-testing repo) - postgis 1.3.1 Generally I tried to avoid the installation from turning into a frankenbuild system but since the offical repos don't provide all our needs I had to resort to rolling my own in some cases. Any hint is greatly appreciated. Best regards Dominik -- Dominik Schmid Dipl. Umweltnaturwissenschafter ETH ilu AG Zentralstrasse 2a CH-8610 Uster Tel: +41 44 / 944 55 56(Direktwahl) Tel: +41 44 / 944 55 55(allgemein) Fax: +41 44 / 944 55 66 mailto:dominik.sch...@ilu.ch http://www.ilu.ch ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Dominik Schmid Dipl. Umweltnaturwissenschafter ETH ilu AG Zentralstrasse 2a CH-8610 Uster Tel: +41 44 / 944 55 56(Direktwahl) Tel: +41 44 / 944 55 55(allgemein) Fax: +41 44 / 944 55 66 mailto:dominik.sch...@ilu.ch http://www.ilu.ch ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] msEvalRegex problem (Mapserver 5.2.2)
Dominik Schmid wrote: IMHO the suggested fix should make it into the 5.4.1 release. For the time being I will tweak our Fusion (1.06) Query.php. AFAIK the Fusion 2.0 beta also uses query.qry. I'm not aware of any other extensions out there. I'd suggest you file a Fusion ticket about this if that's not already done so that the fix makes it in the release: http://trac.osgeo.org/fusion/ Daniel -- Daniel Morissette http://www.mapgears.com/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Environment Canada seeking experienced Web Mapping Programmers
Environment Canada is looking for experienced Web Mapping Programmers. If you are interested in a position with our team and have experience and knowledge of incorporating mapping functionality into web-based solutions please send an email to Yvonne Yuen ( yvonne.y...@ec.gc.ca ) along with your resumé. Based on the information provided, suitable candidates will be notified when the job is officially posted on the Government of Canada web site. We are looking for candidates with significant experience and knowledge in ESRI's ArcIMS or ArcGIS Server with ArcSDE. We also require experience and knowledge in Visual Studio 2008 and MS SQL Server 2005. Experience with Open Source web mapping technology (MapServer) will be considered an asset. Due to our diversified areas of expertise, you will be exposed to many different facets of the Computer Science discipline. You will be given real responsibilities and take satisfaction in seeing your work being used in a real-time operational environment. We offer a challenging and dynamic working environment. We offer some flexibility with work hours. We have a culture of Putting People First. Environment Canada's mandate is to preserve and enhance the quality of the natural environment, including water, air and soil quality; conserve Canada's renewable resources; conserve and protect Canada's water resources; carry out meteorology; enforce the mandate of Canada - United States International Joint Commission relating to boundary waters; and coordinate environmental policies and programs for the federal government. Our mission is to make sustainable development a reality in Canada by helping Canadians live and prosper in an environment that needs to be respected, protected and conserved. At Environment Canada we value our environment and its vital importance to the identity and well-being of present and future generations; the dedication and team-work of our people and integrity, trust and mutual respect in our working relationships; the contribution of the natural and social sciences to environmentally responsible decision making; the exercise, by all Canadians, of a shared responsibility for our environment; the contribution of our leadership to the achievement of sustainable development; and the provision of quality service to the public. Please visit our website at:http://www.ec.gc.ca/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Environment Canada seeking experienced WebMapping Programmers
I have been made aware that this is not the right list to post this message. This will be posted to the OSGeo jobs mailing list instead. Sorry for the inconvenience. Yvonne -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Yuen,Yvonne [Ontario] Sent: Thursday, 23 April 2009 14:13 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Environment Canada seeking experienced WebMapping Programmers Environment Canada is looking for experienced Web Mapping Programmers. If you are interested in a position with our team and have experience and knowledge of incorporating mapping functionality into web-based solutions please send an email to Yvonne Yuen ( yvonne.y...@ec.gc.ca mailto:yvonne.y...@ec.gc.ca ) along with your resumé. Based on the information provided, suitable candidates will be notified when the job is officially posted on the Government of Canada web site. We are looking for candidates with significant experience and knowledge in ESRI's ArcIMS or ArcGIS Server with ArcSDE. We also require experience and knowledge in Visual Studio 2008 and MS SQL Server 2005. Experience with Open Source web mapping technology (MapServer) will be considered an asset. Due to our diversified areas of expertise, you will be exposed to many different facets of the Computer Science discipline. You will be given real responsibilities and take satisfaction in seeing your work being used in a real-time operational environment. We offer a challenging and dynamic working environment. We offer some flexibility with work hours. We have a culture of Putting People First. Environment Canada's mandate is to preserve and enhance the quality of the natural environment, including water, air and soil quality; conserve Canada's renewable resources; conserve and protect Canada's water resources; carry out meteorology; enforce the mandate of Canada - United States International Joint Commission relating to boundary waters; and coordinate environmental policies and programs for the federal government. Our mission is to make sustainable development a reality in Canada by helping Canadians live and prosper in an environment that needs to be respected, protected and conserved. At Environment Canada we value our environment and its vital importance to the identity and well-being of present and future generations; the dedication and team-work of our people and integrity, trust and mutual respect in our working relationships; the contribution of the natural and social sciences to environmentally responsible decision making; the exercise, by all Canadians, of a shared responsibility for our environment; the contribution of our leadership to the achievement of sustainable development; and the provision of quality service to the public. Please visit our website at:http://www.ec.gc.ca/ http://www.ec.gc.ca/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Recall: Environment Canada seeking experienced WebMapping Programmers
Yuen,Yvonne [Ontario] would like to recall the message, Environment Canada seeking experienced WebMapping Programmers. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Re: Environment Canada seeking experienced WebMapping Programmers
I have been made aware that this is not the appropriate list to post this message. This will be posted to the OSGeo jobs mailing list instead. Sorry for the inconvenience. Yvonne -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Yuen,Yvonne [Ontario] Sent: Thursday, 23 April 2009 14:13 To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Environment Canada seeking experienced WebMapping Programmers Environment Canada is looking for experienced Web Mapping Programmers. If you are interested in a position with our team and have experience and knowledge of incorporating mapping functionality into web-based solutions please send an email to Yvonne Yuen ( yvonne.y...@ec.gc.ca mailto:yvonne.y...@ec.gc.ca ) along with your resumé. Based on the information provided, suitable candidates will be notified when the job is officially posted on the Government of Canada web site. We are looking for candidates with significant experience and knowledge in ESRI's ArcIMS or ArcGIS Server with ArcSDE. We also require experience and knowledge in Visual Studio 2008 and MS SQL Server 2005. Experience with Open Source web mapping technology (MapServer) will be considered an asset. Due to our diversified areas of expertise, you will be exposed to many different facets of the Computer Science discipline. You will be given real responsibilities and take satisfaction in seeing your work being used in a real-time operational environment. We offer a challenging and dynamic working environment. We offer some flexibility with work hours. We have a culture of Putting People First. Environment Canada's mandate is to preserve and enhance the quality of the natural environment, including water, air and soil quality; conserve Canada's renewable resources; conserve and protect Canada's water resources; carry out meteorology; enforce the mandate of Canada - United States International Joint Commission relating to boundary waters; and coordinate environmental policies and programs for the federal government. Our mission is to make sustainable development a reality in Canada by helping Canadians live and prosper in an environment that needs to be respected, protected and conserved. At Environment Canada we value our environment and its vital importance to the identity and well-being of present and future generations; the dedication and team-work of our people and integrity, trust and mutual respect in our working relationships; the contribution of the natural and social sciences to environmentally responsible decision making; the exercise, by all Canadians, of a shared responsibility for our environment; the contribution of our leadership to the achievement of sustainable development; and the provision of quality service to the public. Please visit our website at:http://www.ec.gc.ca/ http://www.ec.gc.ca/ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] WEB parameters in mapfile being ignored
I just compiled/installed the 5.4.0 versions of mapserver mapscript. Im loading a mapfile from php, drawing saving the image using '$image-saveWebImage()'. However, the WEB parameters for IMAGEPATH IMAGEURL in my mapfile are being ignored. The file is being saved in the same directory as the php file that has the mapscript being called to draw the map. Even the LOG parameter is being ignored. How can I debug find out why my WEB parameters are being ignored? Please help, Thanks, P.Romero ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WEB parameters in mapfile being ignored
They're ignored for security reasons. It's simply not a good idea to allow an outside user to change where files are being written. They were only ever changeable for the sake of convenience when configuring a demo- not a good reason. Fix is easy, just edit your mapfile and set IMAGEPATH and IMAGEURL appropriately in the WEB section. Steve On 4/23/2009 at 3:18 PM, in message bay117-ds87a6b2bb872a2fd00e094f9...@phx.gbl, P.Romero romero...@hotmail.com wrote: I just compiled/installed the 5.4.0 versions of mapserver mapscript. Im loading a mapfile from php, drawing saving the image using '$image-saveWebImage()'. However, the WEB parameters for IMAGEPATH IMAGEURL in my mapfile are being ignored. The file is being saved in the same directory as the php file that has the mapscript being called to draw the map. Even the LOG parameter is being ignored. How can I debug find out why my WEB parameters are being ignored? Please help, Thanks, P.Romero ___ 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
AW: [mapserver-users] Passing single quoted strings
Hi, Another possibility: somevalue = filter \datum between '2002-8-8' and '2002-8-9'\; Perhaps this works. Arnd -Ursprüngliche Nachricht- Von: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Heiko Schröter Gesendet: Donnerstag, 23. April 2009 09:45 An: Steve Lime; mapserver-users@lists.osgeo.org Betreff: Re: [mapserver-users] Passing single quoted strings On Mittwoch, 22. April 2009 18:07:11 you wrote: I've tested teh scenario with 3 different filter strings and attached the mapserver error logs with DEBUG 5 (in case need be). The resulting URL strings are taken from apache access log file. Please let me know if you need the full URL. Thanks and Regards Heiko The OL call: sacurabiglayer = new OpenLayers.Layer.WMS( SACURABIG, http://kahlo1/cgi-bin/mapserv;, {map:'/home/schroete/sciadaten/MapServer/country98/heiko5.map', layers: sacura_big, map.layer[SACURABIG]: somevalue, transparent: true}, {singleTile:true, isBaseLayer: false, buffer:5, wrapDateLine: true, queryable: true}); Setting of the string in OL: somevalue = filter +'+ datum between +'+2002-8-8+'+ and +'+ 2002-8-9 +''; Results: MAP.LAYER%5BSACURABIG%5D=filter%20'%20datum%20between%20'2002-8-8'%20and%20' %202002-8-9%20'' (ms_error_assembled_string.txt) Setting of the string in OL: somevalue = filter 'datum between '2002-8-8' and '2002-8-9' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'200 2-8-9'%20' (ms_error_unescaped_string.txt) Setting of the string in OL: somevalue = filter 'datum between \'2002-8-8\' and \'2002-8-9\' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'200 2-8-9'%20' (ms_error_escaped_single_quotes.txt) The Mapfile Layer definition: LAYER CONNECTIONTYPE POSTGIS NAME SACURABIG PROCESSING CLOSE_CONNECTION=DEFER OPACITY 60 STATUS ON METADATA wms_title sacurabig layer wms_srs init=epsg:4326 END PROJECTION init=epsg:4326 END CONNECTION user=fei password=foo dbname=fum host=kahlo1 DATA geocenter from sacura_big VALIDATION 'filter' ^.# Just for testing END FILTER orbitnr=0 TYPE POINT SIZEUNITS meters CLASS NAME sacura_big_class STYLE COLOR [farbe] SYMBOL circle SIZE 35000 END END END # Layer What does the URL OL generate look like? I'm curious how it escapes the text for the URL. That should give us a hint. Steve Heiko Schröter schro...@iup.physik.uni-bremen.de 04/21/09 1:53 AM Hello, i have to pass single quoted strings from Open Layer through mapserver to a postgis/postgres database. i.e. filter 'value=1 and datum between '2005-1-1' and '2005-1-3' ; The postgres db expects (afaik) the date in a single quoted string. The problem is that mapserver stops scanning the filter string when coming across the second single quote and bails out. The Validation string in the mapfile: VALIDATION 'filter' ^. END Even when allowing single quotes explicitly by inserting escaped single quotes in the validation string it doesn't work. Escaping the single quotes in the assembled OL string won't help either. Does anyone has an idea of how to pass such strings through mapserver ? Now i do use an ugly hack of converting the date to abstime on the client side (with all the UTC converting hassle) and pass the integer to the db. i.e. filter 'value = 1 and abstime between +fromDate+ and +toDate+'; MapServer version 5.4.0-rc1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=POSTGIS INPUT=SHAPEFILE Thanks and Regards Heiko ___ 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] WEB parameters in mapfile being ignored
The parameters I was referring to *are*, in fact, those in my mapfile. My mapfile contains this: WEB LOG /data/www/html/dev/mslog IMAGEPATH /data/www/html/images/mapserver/tmp/ IMAGEURL /images/mapserver/tmp/ END (I made sure that permissions for these directories are writable by apache). But my 'map.php' file is here: /data/www/html/dev So, calling '$image-saveWebImage()' causes the resulting .gif file to be placed in '/data/www/html/dev' instead of the path listed in my mapfile. Any idea why this could be happening? P.R. -Original Message- From: Steve Lime [mailto:steve.l...@dnr.state.mn.us] Sent: 2009-04-23 3:39 PM To: P.Romero; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WEB parameters in mapfile being ignored They're ignored for security reasons. It's simply not a good idea to allow an outside user to change where files are being written. They were only ever changeable for the sake of convenience when configuring a demo- not a good reason. Fix is easy, just edit your mapfile and set IMAGEPATH and IMAGEURL appropriately in the WEB section. Steve On 4/23/2009 at 3:18 PM, in message bay117-ds87a6b2bb872a2fd00e094f9...@phx.gbl, P.Romero romero...@hotmail.com wrote: I just compiled/installed the 5.4.0 versions of mapserver mapscript. Im loading a mapfile from php, drawing saving the image using '$image-saveWebImage()'. However, the WEB parameters for IMAGEPATH IMAGEURL in my mapfile are being ignored. The file is being saved in the same directory as the php file that has the mapscript being called to draw the map. Even the LOG parameter is being ignored. How can I debug find out why my WEB parameters are being ignored? Please help, Thanks, P.Romero ___ 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] GetFeatureINFO errors in Mapserver not occurring in Geoserver.
We have data that is in Oracle 10.2.0.2 Enterprise Edition with ArcSDE 9.1 General Update Patch 3. We have several spatial views that are causing us issues when GetFeatureINFO is requested via Mapserver 5.2. The result is an SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66). However, using Geoserver 1.7.3 to the same data the GetFeatureINFO request is successful. Any thoughts as to why Mapserver has issues but Geoserver does not? The Spatial View given in the example below is a simple view (no where clauses or join statements). We have re-registered the Spatial view with the sde to make sure the objectid was correct. Looks like Geoserver 1.7.3 doesn’t mind GetFeatureINFO on SCHEMA.AEI_AIR_QUALITY_AOI_SVW Whereas Mapserver 5.2 gets confused.. see examples below http://server/geoserver/wms?service=wmsrequest=getFeatureInfoversion=1.1.1layers=prod:AOIAEIquery_layers=prod:AOIAEIwidth=500height=500SRS=EPSG:4326BBOX=-126.94250575451,54.5026638549918,-126.72424645805,54.6394718590618x=200y=200info_format=text/plain Results for FeatureType 'AOIAEI': geometry = [GEOMETRY (Polygon) with 22 points] air_quality_aoi_id = 66 aoi_name = Bulkley Valley / Lakes District status = Plan Established feature_code = FF00595000 http://server/mapserver/air-climate?service=wmsrequest=getFeatureInfoversion=1.1.1layers=AEI_AIR_QUALITY_AOI_Oquery_layers=AEI_AIR_QUALITY_AOI_Owidth=500height=500SRS=EPSG:4326BBOX=-126.94250575451,54.5026638549918,-126.72424645805,54.6394718590618x=200y=200info_format=text/plain GetFeatureInfo results: Layer 'AEI_AIR_QUALITY_AOI_O' Content-type: application/vnd.ogc.se_xml ?xml version='1.0' encoding=ISO-8859-1 standalone=no ? !DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd; ServiceExceptionReport version=1.1.1 ServiceException msSDELayerGetShape(): SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66) /ServiceException /ServiceExceptionReport many thanks for any assistance. -- View this message in context: http://n2.nabble.com/GetFeatureINFO-errors-in-Mapserver-not-occurring-in-Geoserver.-tp2686390p2686390.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] WEB parameters in mapfile being ignored
My bad, didn't read your message closely enough, sorry. That said, I don't know why you're seeing what you're seeing. If you print out the values of those parameters before you save the image what do you see? Steve On 4/23/2009 at 3:53 PM, in message bay117-ds79867802d672ae8ace33bf9...@phx.gbl, P.Romero romero...@hotmail.com wrote: The parameters I was referring to *are*, in fact, those in my mapfile. My mapfile contains this: WEB LOG /data/www/html/dev/mslog IMAGEPATH /data/www/html/images/mapserver/tmp/ IMAGEURL /images/mapserver/tmp/ END (I made sure that permissions for these directories are writable by apache). But my 'map.php' file is here: /data/www/html/dev So, calling '$image-saveWebImage()' causes the resulting .gif file to be placed in '/data/www/html/dev' instead of the path listed in my mapfile. Any idea why this could be happening? P.R. -Original Message- From: Steve Lime [mailto:steve.l...@dnr.state.mn.us] Sent: 2009-04-23 3:39 PM To: P.Romero; mapserver-users@lists.osgeo.org Subject: Re: [mapserver-users] WEB parameters in mapfile being ignored They're ignored for security reasons. It's simply not a good idea to allow an outside user to change where files are being written. They were only ever changeable for the sake of convenience when configuring a demo- not a good reason. Fix is easy, just edit your mapfile and set IMAGEPATH and IMAGEURL appropriately in the WEB section. Steve On 4/23/2009 at 3:18 PM, in message bay117-ds87a6b2bb872a2fd00e094f9...@phx.gbl, P.Romero romero...@hotmail.com wrote: I just compiled/installed the 5.4.0 versions of mapserver mapscript. Im loading a mapfile from php, drawing saving the image using '$image-saveWebImage()'. However, the WEB parameters for IMAGEPATH IMAGEURL in my mapfile are being ignored. The file is being saved in the same directory as the php file that has the mapscript being called to draw the map. Even the LOG parameter is being ignored. How can I debug find out why my WEB parameters are being ignored? Please help, Thanks, P.Romero ___ 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 mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] GetFeatureINFO errors in Mapserver not occurringin Geoserver.
Sounds like more of an SDE problem than WMS. Can you query the SDE layer outside of WMS just using MapServer queries? Steve On 4/23/2009 at 3:59 PM, in message 1240520397380-2686390.p...@n2.nabble.com, Michelle Douvil mrdouvi...@shaw.ca wrote: We have data that is in Oracle 10.2.0.2 Enterprise Edition with ArcSDE 9.1 General Update Patch 3. We have several spatial views that are causing us issues when GetFeatureINFO is requested via Mapserver 5.2. The result is an SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66). However, using Geoserver 1.7.3 to the same data the GetFeatureINFO request is successful. Any thoughts as to why Mapserver has issues but Geoserver does not? The Spatial View given in the example below is a simple view (no where clauses or join statements). We have re-registered the Spatial view with the sde to make sure the objectid was correct. Looks like Geoserver 1.7.3 doesn’t mind GetFeatureINFO on SCHEMA.AEI_AIR_QUALITY_AOI_SVW Whereas Mapserver 5.2 gets confused.. see examples below http://server/geoserver/wms?service=wmsrequest=getFeatureInfoversion=1.1.1la yers=prod:AOIAEIquery_layers=prod:AOIAEIwidth=500height=500SRS=EPSG:4326BBOX= -126.94250575451,54.5026638549918,-126.72424645805,54.6394718590618x=200y=200 info_format=text/plain Results for FeatureType 'AOIAEI': geometry = [GEOMETRY (Polygon) with 22 points] air_quality_aoi_id = 66 aoi_name = Bulkley Valley / Lakes District status = Plan Established feature_code = FF00595000 http://server/mapserver/air-climate?service=wmsrequest=getFeatureInfoversion =1.1.1layers=AEI_AIR_QUALITY_AOI_Oquery_layers=AEI_AIR_QUALITY_AOI_Owidth=500 height=500SRS=EPSG:4326BBOX=-126.94250575451,54.5026638549918,-126.7242464580 5,54.6394718590618x=200y=200info_format=text/plain GetFeatureInfo results: Layer 'AEI_AIR_QUALITY_AOI_O' Content-type: application/vnd.ogc.se_xml ?xml version='1.0' encoding=ISO-8859-1 standalone=no ? !DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd; ServiceExceptionReport version=1.1.1 ServiceException msSDELayerGetShape(): SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66) /ServiceException /ServiceExceptionReport many thanks for any assistance. -- View this message in context: http://n2.nabble.com/GetFeatureINFO-errors-in-Mapserver-not-occurring-in-Geos erver.-tp2686390p2686390.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] GetFeatureINFO errors in Mapserver not occurringin Geoserver.
Hi Steve, Thanks for the suggestion.. I attempted this URL http://server/mapserver/air-climate?mapsize=1024+370layers=AEI_AIR_QUALITY_AOI_Omapxy=-126.94250575451+54.5026638549918mode=query and it returned: Content-type: text/html msSDELayerGetShape(): SDE error. SE_stream_fetch_row(): Invalid parameter value passed to function. (-66) Looks like WMS and mapserver queries have problems at the same point in the code - msSDElayerGetShape().. I find it odd that Geoserver WMS seems to have no problem with the same sde layer data. Which makes me believe that the underlying SDE data may be OK, but Geoserver and Mapserver somehow do the queries to SDE differently.. many thanks, Michelle Steve Lime wrote: Sounds like more of an SDE problem than WMS. Can you query the SDE layer outside of WMS just using MapServer queries? Steve -- View this message in context: http://n2.nabble.com/GetFeatureINFO-errors-in-Mapserver-not-occurring-in-Geoserver.-tp2686390p2688375.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] Passing single quoted strings
On Donnerstag, 23. April 2009 19:18:32 you wrote: Thanks to Steve and Arnd. This does the trick. somevalue = filter \datum between '2002-8-8' and '2002-8-9'\; Since i'am new to mapserver i was mislead by the docs and examples which use single and double qoutes freely. So i thought they are interchangeable. I cannot find a strict rule in the docs when to use single or double quotes. (Probably my blindness ...) Thanks for your help. Regards Heiko The key is just making it look like a line in a mapfile. Your initial tries used single quotes on a string with internal single quotes. That would have broken a mapfile too. Might want to post a summary solution to your last message to the whole list. Steve On 4/23/2009 at 8:01 AM, in message 200904231501.50805.schro...@iup.physik.uni-bremen.de, Heiko Schröter schro...@iup.physik.uni-bremen.de wrote: On Donnerstag, 23. April 2009 14:34:00 you wrote: Steve you are genius. This works. Can we get this into the docs as well ? Thanks very much. Regards Heiko What about trying? somevalue = filter \datum between '2002-8-8' and '2002-8-9'\; The double quotes around the filter (containing single quotes) should please MapServer. Steve Heiko Schröter schro...@iup.physik.uni-bremen.de 04/23/09 2:46 AM On Mittwoch, 22. April 2009 18:07:11 you wrote: I've tested teh scenario with 3 different filter strings and attached the mapserver error logs with DEBUG 5 (in case need be). The resulting URL strings are taken from apache access log file. Please let me know if you need the full URL. Thanks and Regards Heiko The OL call: sacurabiglayer = new OpenLayers.Layer.WMS( SACURABIG, http://kahlo1/cgi-bin/mapserv;, {map:'/home/schroete/sciadaten/MapServer/country98/heiko5.map', layers: sacura_big, map.layer[SACURABIG]: somevalue, transparent: true}, {singleTile:true, isBaseLayer: false, buffer:5, wrapDateLine: true, queryable: true}); Setting of the string in OL: somevalue = filter +'+ datum between +'+2002-8-8+'+ and +'+ 2002-8-9 +''; Results: MAP.LAYER%5BSACURABIG%5D=filter%20'%20datum%20between%20'2002-8-8'%20and%20 '%202002-8-9%20'' (ms_error_assembled_string.txt) Setting of the string in OL: somevalue = filter 'datum between '2002-8-8' and '2002-8-9' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'20 02-8-9'%20' (ms_error_unescaped_string.txt) Setting of the string in OL: somevalue = filter 'datum between \'2002-8-8\' and \'2002-8-9\' '; MAP.LAYER%5BSACURABIG%5D=filter%20'datum%20between%20'2002-8-8'%20and%20'20 02-8-9'%20' (ms_error_escaped_single_quotes.txt) The Mapfile Layer definition: LAYER CONNECTIONTYPE POSTGIS NAME SACURABIG PROCESSING CLOSE_CONNECTION=DEFER OPACITY 60 STATUS ON METADATA wms_title sacurabig layer wms_srs init=epsg:4326 END PROJECTION init=epsg:4326 END CONNECTION user=fei password=foo dbname=fum host=kahlo1 DATA geocenter from sacura_big VALIDATION 'filter' ^.# Just for testing END FILTER orbitnr=0 TYPE POINT SIZEUNITS meters CLASS NAME sacura_big_class STYLE COLOR [farbe] SYMBOL circle SIZE 35000 END END END # Layer What does the URL OL generate look like? I'm curious how it escapes the text for the URL. That should give us a hint. Steve Heiko Schröter schro...@iup.physik.uni-bremen.de 04/21/09 1:53 AM Hello, i have to pass single quoted strings from Open Layer through mapserver to a postgis/postgres database. i.e. filter 'value=1 and datum between '2005-1-1' and '2005-1-3' ; The postgres db expects (afaik) the date in a single quoted string. The problem is that mapserver stops scanning the filter string when coming across the second single quote and bails out. The Validation string in the mapfile: VALIDATION 'filter' ^. END Even when allowing single quotes explicitly by inserting escaped single quotes in the validation string it doesn't work. Escaping the single quotes in the assembled OL string won't help either. Does anyone has an idea of how to pass such strings through mapserver ? Now i do use an ugly hack of converting the date