[mapserver-users] Configuring Mapserver in IIS - Anonymous Access?
Hi, I have a Mapserver virtual directory in C:\inetpub\wwwroot and I am able to generate a WMS layer through my site if the virtual directory in IIS has a tick for Integrated Windows Authentication under the directory securty tab in the properties. If i try and configue this virtual directory to be Anonymous Access only, my WMS layer does not get created. When I try and navigate to the URL that would produce the WMS image, I get an error message regarding not being able to open the ms_error.txt file under /Mapserver/tmp. Are there any specific permissions i need to set? I have tried searching online to see if i can find out how to configure this and I've not been successful. If somebody could give me a pointer, that would be fantastic. Many thanks. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Configuring-Mapserver-in-IIS-Anonymous-Access-tp6995743p6995743.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] GetFeatureInfo: Search returned no results, with OGR-DATA
Hello All, I'm trying to migrate to MapServer 6.0.1. Now I have a Problem with GetFeatureInfo Request to OGR-Datasets. I have stored the same Data in to GIS-Formats (MapInfo tab an ESRI Shp). The Layer Definition in my mapfile is: LAYER # Stadtbezirksgrenzen # Name und Geometrietyp NAME Stadtbezirksgrenzen TYPE POLYGON # Sichtbarkeit STATUS OFF MINSCALE 0 MAXSCALE 2500 #DEBUG TRUE # Datenquelle DATA statist/shp/Stadtb_region.shp #CONNECTIONTYPE OGR #CONNECTION statist/Stadtb.TAB PROJECTION init=EPSG:31466 #init=EPSG:25832 END # Darstellung in der Karte. # Stadtbezirk CLASS NAME Stadtbezirksgrenzen STYLE # Umrandung OUTLINECOLOR 255 0 0 SYMBOL Linie Size 2 END END # für HTML queries TEMPLATE ./html/objektinfo.html METADATA # Für OGC Services WMS_ENABLE_REQUEST * WMS_SRS EPSG:31466 EPSG:31467 EPSG:25832 EPSG:44122 EPSG:35832 EPSG:4326 WMS_TITLE Stadtbezirksgrenzen WMS_abstract Stadtbezirksgrenzen der Stadt Dortmund WMS_keywordlistStadtbezirk WMS_opaque0 GML_INCLUDE_ITEMS all WMS_INCLUDE_ITEMS all WMS_FEATURE_INFO_MIME_TYPE text/html WMS_ENCODING ISO-8859-1 END END If I use the Shapefile as Datasource the FeatureInfo Request works fine: Request: http://asgeow02.stadtdo.de/mapserver6/mapserver?map=/GDI_Programme/UMNMapServer6/Dienste/Geobasisdaten/wmstest.mapSERVICE=WMSVERSION=1.3.0REQUEST=GetFeatureInfoBBOX=383996.973679,5706704.707753,396276.247858,5713754.308091CRS=EPSG:25832WIDTH=1175HEIGHT=675LAYERS=StadtbezirksgrenzenSTYLES=FORMAT=image/pngTRANSPARENT=TRUEQUERY_LAYERS=StadtbezirksgrenzenINFO_FORMAT=text/plainX=423Y=83 Response: GetFeatureInfo results: Layer 'Stadtbezirksgrenzen' Feature 11: STBEZNR = '9' EDATUM = '19891231' GELösCHT = '' FORTFühRUN = '19941001' BEZEICHNUN = 'MENGEDE' If I use the MapInfo (OGR) as Datasource, i get no result. Layer Definition change: #DATA statist/shp/Stadtb_region.shp CONNECTIONTYPE OGR CONNECTION statist/Stadtb.TAB The Request is the same. Response: GetFeatureInfo results: Search returned no results. The getMap-Request works fine with both Datasources. Thanks for any help! Uwe -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/GetFeatureInfo-Search-returned-no-results-with-OGR-DATA-tp6995758p6995758.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] Problem with Variable Substitution for EXPRESSION
Hi, I need to compare one attribute from database table in EXPRESSION (under LAYER) with six different values passed as Variable Substitution for coloring the layer. I did added validation for those variables in the map file, but for some reason I am getting the below error. *msValidateParameter(): Regular expression error. Parameter pattern validation failed.* *msEvalRegex(): Regular expression error. String failed expression test.* *msValidateParameter(): Regular expression error. Parameter pattern validation failed.* * * Could anyone help me with where I am wrong? Below is the map file content for this layer. All the six variables would be numbers (may be a decimal number), Is my regular expression correct? WEB VALIDATION value_one ^[\d+(\.\d)]*$ value_two ^[\d+(\.\d)]*$ value_three [^\d+(\.\d)]*$ value_four[^\d+(\.\d)]*$ value_five[^\d+(\.\d)]*$ value_six [^\d+(\.\d)]*$ END END LAYER NAME state TYPE polygon STATUS ON CONNECTIONTYPE POSTGIS CONNECTION user=postgres password=** dbname=shpdb host=localhost port=5432 DATA the_geom FROM (SELECT gid, the_geom, totpop1 FROM state_shape) AS SUBQUERY using unique gid PROCESSING CLOSE_CONNECTION=DEFER CLASSITEM totpop1 OPACITY 100 CLASS EXPRESSION ([TOTPOP1] = %value_one% AND [TOTPOP1] %value_two%) STYLE COLOR 255 108 118 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_two% AND [TOTPOP1] %value_three%) STYLE COLOR 254 189 75 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_three% AND [TOTPOP1] %value_four%) STYLE COLOR 254 247 46 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_four% AND [TOTPOP1] %value_five%) STYLE COLOR 39 251 114 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_five% AND [TOTPOP1] = %value_six%) STYLE COLOR 108 111 205 OUTLINECOLOR 255 255 255 END END END -- Regards, Prabu Raja ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] crash mapserver with some specific jpeg output and truetype symbol over raster
hi all Im experimenting some weird behavior with some jpeg output on a Mapserver 6.0.0 I have two layers: a raster layer and a watermark using a truetype symbol over it. When requesting the jpeg output, at the very specific FORMATOPTION QUALITY=88, Mapserver crash with a Floating point exception. The image is still generated (???), but the error make it impossible to server the image with fastcgi, as the Mapserver error trigger an error 500 in apache. I DONT have any problem if: 1) I request a png image 2) I change the FORMATOPTION QUALITY=88 to 87 or 89 I have prepared a minimal testcase which allow to reproduce the problem: http://publicshare.camptocamp.com/mapserver/testcase.zip which can be triggered with: shp2img -m testcase.map -l ch.swisstopo.pixelkarte-farbe-pk200.noscale ch.swisstopo.watermark -i jpeg -s 256 256 -e 624800.0 132400.0 625440.0 133040.0 test.jpg or: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test2.jpeg I just had a look using gdb (but I dont have enough knowledge to get any info from this sadely): gdb /usr/lib/cgi-bin/mapserv GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/lib/cgi-bin/mapserv...(no debugging symbols found)...done. (gdb) run -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test2.jpeg Starting program: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test20.jpeg [Thread debugging using libthread_db enabled] Program received signal SIGFPE, Arithmetic exception. 0x004e20dd in ?? () (gdb) backtrace #0 0x004e20dd in ?? () #1 0x0051401e in jpeg_stream_term_destination () #2 0x774dac6f in jpeg_finish_compress () from /usr/lib/libjpeg.so.62 #3 0x005144af in ?? () #4 0x005168ea in ?? () #5 0x00454fbf in ?? () #6 0x0041e1bb in main () I had a look at Mapserver 6.0.1 changelog but I couldnt find a bug which may be similar. Is this a known issue? Could someone tell me if it is enough to open a bug? Thanks in advance best regards Oliver ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WFS GetFeature outputformat error
Hi John, I tested locally with MapServer-trunk on Windows, using your outputformat block, and I successfully returned a 'result.csv' file, containing the WKT of the features, for STORAGE=filesystem. I also kept a close eye on my IMAGEPATH directory, but I never saw any temporary files get generated there (it is a mystery to me as well). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-11-15 1:33 AM, John Cartwright wrote: Hello All, I'm trying to use an OGR outputformat as described in http://mapserver.org/output/ogr_output.html. Map file contains: OUTPUTFORMAT NAME CSV DRIVER OGR/CSV MIMETYPE text/csv FORMATOPTION LCO:GEOMETRY=AS_WKT FORMATOPTION STORAGE=filesystem FORMATOPTION FORM=simple FORMATOPTION FILENAME=result.csv END WEB IMAGEPATH /Library/WebServer/Documents/output IMAGEURL /output/ ... END a request like: http://localhost/cgi-bin/basicworld?SERVICE=WFSVERSION=1.0.0REQUEST=GetFeaturetypename=citiesmaxfeatures=10ouputformat=CSV returns the error: ServiceException code=NoApplicableCode locator=mapserv msOGRWriteFromQuery(): General error message. Failed to open result file#39;/tmp/4ec1f737_ee6f_0/result.csv#39;. /ServiceException I don't understand why it's trying to open the output file in /tmp rather than the IMAGEPATH directory. Also, if MapServer is unable to create the new work directory (4ec1f737_ee6f_0 in the above example), I'm not sure how to handle that - even if it writes to /tmp. This is version 6.0.1 on linux. Thanks for any help! --john ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] WFS GetFeature outputformat error
Hi, I tried once something like that on Ubuntu Linux too and got a similar Failed to open result file error. I was just playing and never investigated the thing further. -Jukka Rahkonen- -Alkuperäinen viesti- Lähettäjä: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] Puolesta Jeff McKenna Lähetetty: 15. marraskuuta 2011 16:22 Vastaanottaja: mapserver-users@lists.osgeo.org Aihe: Re: [mapserver-users] WFS GetFeature outputformat error Hi John, I tested locally with MapServer-trunk on Windows, using your outputformat block, and I successfully returned a 'result.csv' file, containing the WKT of the features, for STORAGE=filesystem. I also kept a close eye on my IMAGEPATH directory, but I never saw any temporary files get generated there (it is a mystery to me as well). -jeff -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ On 11-11-15 1:33 AM, John Cartwright wrote: Hello All, I'm trying to use an OGR outputformat as described in http://mapserver.org/output/ogr_output.html. Map file contains: OUTPUTFORMAT NAME CSV DRIVER OGR/CSV MIMETYPE text/csv FORMATOPTION LCO:GEOMETRY=AS_WKT FORMATOPTION STORAGE=filesystem FORMATOPTION FORM=simple FORMATOPTION FILENAME=result.csv END WEB IMAGEPATH /Library/WebServer/Documents/output IMAGEURL /output/ ... END a request like: http://localhost/cgi-bin/basicworld?SERVICE=WFSVERSION=1.0.0; REQUEST=GetFeaturetypename=citiesmaxfeatures=10ouputformat=CSV returns the error: ServiceException code=NoApplicableCode locator=mapserv msOGRWriteFromQuery(): General error message. Failed to open result file#39;/tmp/4ec1f737_ee6f_0/result.csv#39;. /ServiceException I don't understand why it's trying to open the output file in /tmp rather than the IMAGEPATH directory. Also, if MapServer is unable to create the new work directory (4ec1f737_ee6f_0 in the above example), I'm not sure how to handle that - even if it writes to /tmp. This is version 6.0.1 on linux. Thanks for any help! --john ___ 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] Configuring Mapserver in IIS - Anonymous Access?
You need to ensure you've enabled write permissions on the virtual directory (using IIS). And I think you'll need to confirm the IIS user acount (something like IUSR_) can write to the file system folder (wherever /mapserver/tmp points to). Use Windows Explorer, right-click on the folder, look at the Security tab, and give the IUSR_ write permission. Best Regards, Brent Fraser On 11/15/2011 3:19 AM, daz4805 wrote: Hi, I have a Mapserver virtual directory in C:\inetpub\wwwroot and I am able to generate a WMS layer through my site if the virtual directory in IIS has a tick for Integrated Windows Authentication under the directory securty tab in the properties. If i try and configue this virtual directory to be Anonymous Access only, my WMS layer does not get created. When I try and navigate to the URL that would produce the WMS image, I get an error message regarding not being able to open the ms_error.txt file under /Mapserver/tmp. Are there any specific permissions i need to set? I have tried searching online to see if i can find out how to configure this and I've not been successful. If somebody could give me a pointer, that would be fantastic. Many thanks. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Configuring-Mapserver-in-IIS-Anonymous-Access-tp6995743p6995743.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] Problem with Variable Substitution for EXPRESSION
See http://www.regular-expressions.info/floatingpoint.html for some good examples. Steve From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Prabu Raja Sent: Tuesday, November 15, 2011 4:29 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] Problem with Variable Substitution for EXPRESSION Hi, I need to compare one attribute from database table in EXPRESSION (under LAYER) with six different values passed as Variable Substitution for coloring the layer. I did added validation for those variables in the map file, but for some reason I am getting the below error. msValidateParameter(): Regular expression error. Parameter pattern validation failed. msEvalRegex(): Regular expression error. String failed expression test. msValidateParameter(): Regular expression error. Parameter pattern validation failed. Could anyone help me with where I am wrong? Below is the map file content for this layer. All the six variables would be numbers (may be a decimal number), Is my regular expression correct? WEB VALIDATION value_one ^[\d+(\.\d)]*$ value_two ^[\d+(\.\d)]*$ value_three [^\d+(\.\d)]*$ value_four[^\d+(\.\d)]*$ value_five[^\d+(\.\d)]*$ value_six [^\d+(\.\d)]*$ END END LAYER NAME state TYPE polygon STATUS ON CONNECTIONTYPE POSTGIS CONNECTION user=postgres password=** dbname=shpdb host=localhost port=5432 DATA the_geom FROM (SELECT gid, the_geom, totpop1 FROM state_shape) AS SUBQUERY using unique gid PROCESSING CLOSE_CONNECTION=DEFER CLASSITEM totpop1 OPACITY 100 CLASS EXPRESSION ([TOTPOP1] = %value_one% AND [TOTPOP1] %value_two%) STYLE COLOR 255 108 118 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_two% AND [TOTPOP1] %value_three%) STYLE COLOR 254 189 75 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_three% AND [TOTPOP1] %value_four%) STYLE COLOR 254 247 46 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_four% AND [TOTPOP1] %value_five%) STYLE COLOR 39 251 114 OUTLINECOLOR 255 255 255 END END CLASS EXPRESSION ([TOTPOP1] = %value_five% AND [TOTPOP1] = %value_six%) STYLE COLOR 108 111 205 OUTLINECOLOR 255 255 255 END END END -- Regards, Prabu Raja ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] crash mapserver with some specific jpeg output and truetype symbol over raster
This is enough to open a bug, can you do that? -Steve -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Oliver Christen Sent: Tuesday, November 15, 2011 7:15 AM To: mapserver-users@lists.osgeo.org Subject: [mapserver-users] crash mapserver with some specific jpeg output and truetype symbol over raster hi all Im experimenting some weird behavior with some jpeg output on a Mapserver 6.0.0 I have two layers: a raster layer and a watermark using a truetype symbol over it. When requesting the jpeg output, at the very specific FORMATOPTION QUALITY=88, Mapserver crash with a Floating point exception. The image is still generated (???), but the error make it impossible to server the image with fastcgi, as the Mapserver error trigger an error 500 in apache. I DONT have any problem if: 1) I request a png image 2) I change the FORMATOPTION QUALITY=88 to 87 or 89 I have prepared a minimal testcase which allow to reproduce the problem: http://publicshare.camptocamp.com/mapserver/testcase.zip which can be triggered with: shp2img -m testcase.map -l ch.swisstopo.pixelkarte-farbe-pk200.noscale ch.swisstopo.watermark -i jpeg -s 256 256 -e 624800.0 132400.0 625440.0 133040.0 test.jpg or: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test2.jpeg I just had a look using gdb (but I dont have enough knowledge to get any info from this sadely): gdb /usr/lib/cgi-bin/mapserv GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/lib/cgi-bin/mapserv...(no debugging symbols found)...done. (gdb) run -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test2.jpeg Starting program: /usr/lib/cgi-bin/mapserv -nh QUERY_STRING=map=testcase.mapmode=maplayers=ch.swisstopo.pixelkarte-farbe-pk200.noscale+ch.swisstopo.watermarkmapext=624800.0+132400.0+625440.0+133040.0mapsize=256+256 test20.jpeg [Thread debugging using libthread_db enabled] Program received signal SIGFPE, Arithmetic exception. 0x004e20dd in ?? () (gdb) backtrace #0 0x004e20dd in ?? () #1 0x0051401e in jpeg_stream_term_destination () #2 0x774dac6f in jpeg_finish_compress () from /usr/lib/libjpeg.so.62 #3 0x005144af in ?? () #4 0x005168ea in ?? () #5 0x00454fbf in ?? () #6 0x0041e1bb in main () I had a look at Mapserver 6.0.1 changelog but I couldnt find a bug which may be similar. Is this a known issue? Could someone tell me if it is enough to open a bug? Thanks in advance best regards Oliver ___ 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