Re: [MapServer-users] Mapfile -> EMPTY-Parameter -> Migrate from MS 7.6 -> 8.0

2024-09-18 Thread Steve Lime via MapServer-users
Hi Georg: There was a regression in 8.0 that broke the EMPTY redirection.
It had to do with considering 0 results as a valid query result and not an
error. The functionality was fixed in 8.2 and is working fine for me at
least.

—Steve

On Wed, Sep 11, 2024 at 8:10 AM Ulbrich, Georg via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Sorry, I'm currently migrating from MS 7.6 to MS 8.2.2 - but here too I
> can't find any difference in the documentation.
>
>
> -Ursprüngliche Nachricht-
> Von: MapServer-users  Im Auftrag
> von Ulbrich, Georg via MapServer-users
> Gesendet: Mittwoch, 11. September 2024 14:49
> An: mapserver-users@lists.osgeo.org
> Betreff: [MapServer-users] Mapfile -> EMPTY-Parameter -> Migrate from MS
> 7.6 -> 8.0
>
> I'm migrating from MS 7.6 to 8.0:
> In MS 7.6, when I clicked on a coordinate with no data in the GFI, I was
> redirected to the web page specified with the "EMPTY" parameter in mapfile:
>
> EMPTY'https://isk.geobasis-bb.de/error_pages/wms_gfi_empty.html'
>
> Now in MS 8.0.0 I get a blank page (HTTP 200).
> Does anyone have an idea why the redirection no longer works? I couldn't
> find any changes in the documentation.
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] OGC API Features Part4 CRUD

2024-08-16 Thread Steve Lime via MapServer-users
AFAIK nothing is planned. I think that’s probably a much more significant
effort relative to the initial implementation. —Steve

On Thu, Aug 15, 2024 at 4:39 AM Malta e Sousa Stéphane via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hello,
>
> I hope this message finds you well. I'm inquiring whether the
> implementation of OGC API Features Part 4 (CRUD) is planned? I believe that
> MapServer does not support editing, but is there any development planned on
> the TinyOWS side?
>
> Stéphane Malta e Sousa
> Responsable de projet et développement
> 
>
> Département du développement territorial et de l'environnement
> Service de la géomatique et du registre foncier
> https://www.ne.ch/sitn
>
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Runtime substitution on MAP CONFIG environmental variables

2023-12-26 Thread Steve Lime via MapServer-users
The validation block would go in the WEB object. However, the runtime subs
don't operate with config options. There was a ticket related to this
message opened already (see
https://github.com/MapServer/MapServer/issues/6994), presumably based on
this thread. I'm curious what other devs think about the idea.

--Steve

On Tue, Dec 19, 2023 at 7:21 AM Marcin Niemyjski via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hello,
>
> is it possible to perform such operation using parameters stored in
> request URL
> MAP
>   NAME "Results of crop prediction"
>
>   CONFIG "AWS_S3_ENDPOINT" "some.ednpoint.com"
>   CONFIG "AWS_ACCESS_KEY_ID" "%s3_access%"
>   CONFIG "AWS_SECRET_ACCESS_KEY" "%s3_secret%"
> ...
>
> so, I can select which pair of S3 keys i would like to use.
>
> If it is, where should validation block be stored?
>
> Best,
> Marcin
>
> 
>  Book
> time to meet with me
> 
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Speeding up msDrawMap() for shapefiles

2023-12-18 Thread Steve Lime via MapServer-users
Did you have a look at https://blog.cleverelephant.ca/2022/04/coshp.html?

On Mon, Dec 18, 2023 at 2:39 PM Matthew Graber via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi Jukka,
>
> Thanks for the advice. I was able to confirm through local testing that
> using "DATA" is consistently faster than using the OGR connection (was
> getting over 500 ms for OGR vs just over 300 ms for DATA). My results are
> also suggesting that performing the shapefile optimizations may make my
> request several hundredths of a second faster, I'm a little less sure on
> that one. But regardless, it appears that the bulk of the problem with the
> slow S3 connection is likely S3's overhead, so I don't think there's
> anything more I can do with MapServer to speed it up.
>
> Thanks again,
> Matt
>
> On Fri, Dec 8, 2023 at 11:58 AM Rahkonen Jukka <
> jukka.rahko...@maanmittauslaitos.fi> wrote:
>
>> Hi,
>>
>>
>>
>> You should test the same shapefiles locally for understanding where the
>> time gets spent. Normal time with simple styles is perhaps up to 300 ms.
>> The optimization hints were written long before there were S3 or Amazon
>> (the company).
>>
>> Unfortunately I don’t know how to optimize access to S3.
>>
>>
>>
>> -Jukka Rahkonen-
>>
>>
>>
>> *Lähettäjä:* MapServer-users  
>> *Puolesta
>> *Matthew Graber via MapServer-users
>> *Lähetetty:* perjantai 8. joulukuuta 2023 21.47
>> *Vastaanottaja:* mapserver-users@lists.osgeo.org
>> *Aihe:* [MapServer-users] Speeding up msDrawMap() for shapefiles
>>
>>
>>
>> Hi,
>>
>>
>>
>> I'm trying to speed up the time required for msDrawMap() to execute for
>> rendering shapefiles. Currently, according to the mapserver logs, it's
>> taking 2.5-3.5 seconds, sometimes up to 5 seconds for it to execute:
>>
>>
>>
>> [Wed Dec  6 18:43:47 2023].699791 CGI Request 53 on process 2641
>> [Wed Dec  6 18:43:47 2023].717216 msDrawMap(): rendering using
>> outputformat named png (AGG/PNG).
>> [Wed Dec  6 18:43:52 2023].299580 msDrawMap(): Layer 1010
>> (Shapefile_Layer), 4.582s
>> [Wed Dec  6 18:43:52 2023].299792 msDrawMap(): Drawing Label Cache, 0.000s
>> [Wed Dec  6 18:43:52 2023].299803 msDrawMap() total time: 4.584s
>> [Wed Dec  6 18:43:52 2023].310853 msSaveImage(stdout) total time: 0.011s
>>
>> [Wed Dec  6 18:43:52 2023].310883 mapserv request processing time
>> (msLoadMap not incl.): 4.611s
>>
>>
>>
>> The mapfile is currently set up using "CONNECTIONTYPE OGR" and
>> "CONNECTION" to access the shapefiles from an S3 bucket as follows:
>>
>>
>>
>> CONNECTIONTYPE OGR
>> CONNECTION'/vsis3/s3_bucket_path/my_shapefile%.shp'
>>
>>
>>
>> I noticed at https://mapserver.org/input/vector/shapefiles.html that it
>> says "Shapefile access is built directly into MapServer. It is also
>> available through OGR, but direct access without OGR is recommended and
>> discussed here."
>>
>> So I tried removing "CONNECTIONTYPE OGR" and changing "CONNECTION" to
>> "DATA" as follows:
>>
>>
>>
>>  DATA'/vsis3/s3_bucket_path/my_shapefile%.shp'
>>
>>
>>
>> I haven't been able to observe any definitive speed improvements by doing
>> this yet, although I can't say for sure that there aren't any.
>>
>>
>>
>> Based on https://mapserver.org/optimization/vector.html, I also tried
>> using the shptree command to create a spatial index and the coshp command
>> to sort the shapefile and index. Even after doing that, I still see load
>> msDrawMap() times of up to 5 seconds.
>>
>>
>>
>> Does anyone know of any other optimizations that could be made here? Or
>> if not, would using shptree and coshp on the shapefile and then accessing
>> it in the mapfile using "DATA" to take it from S3 be the optimal way to set
>> things up?
>>
>>
>>
>> Thanks!
>>
>> Matt
>>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Can I call mapserver with GetLegendGraphic request using curl?

2023-12-15 Thread Steve Lime via MapServer-users
I do this all the time to create static versions of assets. Typically I
just use a bash script and wget but I can't think of a reason offhand why
curl wouldn't work just fine. What does a curl call look like?

--Steve

On Thu, Dec 14, 2023 at 3:32 PM Schweitzer, Peter N via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> I have map interfaces that use a dozen or so legend graphics, but it
> requires separate calls to mapserver for every user.  I would prefer to
> cache these images (PNG) rather than make mapserver recalculate the same
> legend graphic many times for each user session.  But when I do a curl, I
> keep getting the "requires a TEMPLATE" message.  The images work within my
> JS (OpenLayers 5.3), but not through a stand-alone web request.
>
> Example:  https://mrdata.usgs.gov/general/map-global.html  27 calls to
> mapserv to get legend images that don't change.
>
> Is there a way I can get these images and cache them on the server so that
> mapserver doesn't have to chew up processor cycles and time for them every
> time?
>
> Thanks for any help you may be able to offer.
>
> Peter
>
> Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)
> (703) 648-6533  email: pschweit...@usgs.gov
> https://www.usgs.gov/staff-profiles/peter-n-schweitzer
> https://orcid.org/-0002-9532-6681
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-05 Thread Steve Lime via MapServer-users
It won’t work. A configuration is loaded in entirety first, and then
applied as necessary.

On Tue, Dec 5, 2023 at 7:21 AM Jan Hartmann via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Not sure. I cannot get it working anyway. Any ideas, Steve?
>
> On 04/12/2023 10:10, Jörg Thomsen (WhereGroup) via MapServer-users wrote:
> > Hi,
> >
> > I am not sure, but perhaps overwriting it, would work?
> >
> > MAP
> >
> >   shapepath 'blah'
> >
> >   Layer 1
> >   Layer 2
> >
> >   shapepath 'blubb'
> >
> >   Layer 3
> >   Layer 4
> >
> > Jörg
> >
> >
> >
> > Am 02.12.23 um 19:32 schrieb Jan Hartmann via MapServer-users:
> >> Yes, that is what I sought, didn't know it was possible. Thanks!
> >>
> >> Jan
> >>
> >> On 02/12/2023 19:29, Steve Lime wrote:
> >>> One other thought, you can use multiple paths via runtime subs to
> >>> approximate what I think you’re looking for, so:
> >>>
> >>> WEB
> >>>   VALIDATION
> >>> path1_default “/opt/path1”
> >>> path1 “^\/opt\/path1$”
> >>>   path2_default “/opt/path2”
> >>>   path2 “^\/opt\/path2$”
> >>>   END
> >>> END
> >>>
> >>> Then in DATA values you’d use %path1% or %path2%. This is another
> >>> use case for variables that was suggested recently. We could,
> >>> perhaps, define a way to mark something as immutable via url so the
> >>> regex could be simplified and only the default would ever be used
> >>> (e.g. “path2” “immutable”).
> >>>
> >>> —Steve
> >>>
> >>> On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:
> >>>
> >>> Nope, just the one value.
> >>>
> >>> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users
> >>>  wrote:
> >>>
> >>> Hi,
> >>>
> >>> Is it possible to use multiple paths in a shapepath?
> >>> ./data1:./data2
> >>> does not work
> >>>
> >>> Jan
> >>> ___
> >>> MapServer-users mailing list
> >>> MapServer-users@lists.osgeo.org
> >>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >>>
> >>
> >>
> >> ___
> >> MapServer-users mailing list
> >> MapServer-users@lists.osgeo.org
> >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-02 Thread Steve Lime via MapServer-users
One other thought, you can use multiple paths via runtime subs to
approximate what I think you’re looking for, so:

WEB
  VALIDATION
path1_default “/opt/path1”
path1 “^\/opt\/path1$”
path2_default “/opt/path2”
path2 “^\/opt\/path2$”
  END
END

Then in DATA values you’d use %path1% or %path2%. This is another use case
for variables that was suggested recently. We could, perhaps, define a way
to mark something as immutable via url so the regex could be simplified and
only the default would ever be used (e.g. “path2” “immutable”).

—Steve

On Fri, Dec 1, 2023 at 11:28 PM Steve Lime  wrote:

> Nope, just the one value.
>
> On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users <
> mapserver-users@lists.osgeo.org> wrote:
>
>> Hi,
>>
>> Is it possible to use multiple paths in a shapepath? ./data1:./data2
>> does not work
>>
>> Jan
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] multiple shapepaths

2023-12-01 Thread Steve Lime via MapServer-users
Nope, just the one value.

On Fri, Dec 1, 2023 at 1:02 PM Jan Hartmann via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi,
>
> Is it possible to use multiple paths in a shapepath? ./data1:./data2
> does not work
>
> Jan
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] MapServer WEB global footer header are shown as result even if no feature was effected

2023-11-06 Thread Steve Lime via MapServer-users
Hi Astrid: I noticed this too but in a slightly different way. It's a bug,
see the discussion here:

  https://github.com/MapServer/MapServer/issues/6907


Basically the EMPTY keyword is being ignored. This will be fixed in 8.2...


--Steve

On Mon, Nov 6, 2023 at 9:39 AM Astrid Emde (WhereGroup) via MapServer-users
 wrote:

> Hello all,
>
> I have noticed a different behaviour in MapServer 8 in comparision to
> MapServer 7.
>
> In the Web-Section I use a global header and footer and I created an
> empty.html page. The definition in the Web-Section looks like:
>
> WEB
> HEADER './templates/header.html'
> FOOTER './templates/footer.html'
> EMPTY 'http://myserver/ms_empty.html'
>
> Before Version 8
> - MapServer would show the EMPTY-html if no result comes back from a
> Featureinfo-Request
>
> But with MapServer 8
> - The Header & Footer are given back - with no results in the middle
>
> When I define everything in the LAYER the behaviour is a bit better - I
> get back an empty result but still not the content of the EMPTY-File
>  HEADER "./templates/header.html"
>  TEMPLATE "./templates/plz.html"
>  FOOTER "./templates/footer.html"
>
> My question: How can I get back the old behaviour and only get back the
> content of the Empty-file?
>
> Did the definition change?
> Or is it a bug? Does someone else noticed the behaviour?
>
> I checked the actual issues, but I could not find anything about it
>
> https://github.com/MapServer/MapServer/issues/6907
>
>
> Documentation see
> https://mapserver.org/mapfile/web.html
>
> --
> Best regards
>
> Astrid Emde
> GIS-Consultant
>
> **
> Where2B Konferenz 2023
> 14. Dezember 2023 in Bonn und Online
> https://where2b-conference.com/
> **
>
>Astrid Emde
>WhereGroup GmbH
>Eifelstraße 7
>53119 Bonn
>Germany
>
>Tel: +49(0)228 90 90 38 - 22
>Fax: +49(0)228 90 90 38 - 11
>
>astrid.e...@wheregroup.com
>www.wheregroup.com
>
>Meinen PGP Public-Key können Sie unter pgp.mit.edu herunterladen:
>
>
> https://keys.openpgp.org/vks/v1/by-fingerprint/01F8152D36FC07C25EADDE86C5084ACC1C287CCB
>Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
>
>Folgen Sie der WhereGroup auf twitter:
>http://twitter.com/WhereGroup_com
>
>Geschäftsführer:
>Olaf Knopp, Peter Stamm
>Amtsgericht Bonn, HRB 9885
>
> ---___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] mappyfile is now an OSGeo Community Project

2023-09-28 Thread Steve Lime via MapServer-users
Agreed! Congrats Seth!

On Thu, Sep 28, 2023 at 9:29 AM Even Rouault via MapServer-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi Seth,
>
> Congratulations!  I believe it would make sense to point to mappyfile on
> the mapserver.org documentation. Exact place to be determined ("Around
> MapServer?"), but referencing the FOSS ecosystem upon MapServer would
> certainly be useful to users.
>
> Even
>
> Le 28/09/2023 à 12:05, Seth G via MapServer-users a écrit :
> > Hi all,
> >
> > This month mappyfile became an official OSGeo Community Project [1]. To
> celebrate there is a v1.0.0 release, this drops Python 2.7 support, but
> includes over a year of fixes and improvements. Full release notes are at
> [2].
> >
> > mappyfile is a Python library that allows you to easily create, edit,
> and format MapServer Mapfiles. Source code is on GitHub [3] and docs are at
> https://mappyfile.readthedocs.io/ and it is available on PyPI [4].
> >
> > Any feedback or issue reporting welcome,
> >
> > Seth
> >
> > [1] https://www.osgeo.org/projects/mappyfile/
> > [2] https://mappyfile.readthedocs.io/en/latest/HISTORY.html
> > [3] https://github.com/geographika/mappyfile
> > [4] https://pypi.org/project/mappyfile/
> >
> > --
> > web:https://geographika.net & https://mapserverstudio.net
> > twitter: @geographika
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> --
> http://www.spatialys.com
> My software is free, but my time generally not.
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] CGI variable "map" fails to validate.

2021-06-03 Thread Steve Lime via mapserver-users
I should note that 7.6.3 (also 7.4.5, 7.2.3 and 7.0.8) should make defining
a value for MS_MAP_PATTERN much simpler. We updated things to use two
filters instead of one. The first, MS_MAP_BAD_PATTERN, checks for
problematic character sequences in the map value, for example /./, /../ or
// and fails if there is a match. This means you don't have to account for
those with MS_MAP_PATTERN alone and you can just write something simple
like:

  MS_MAP_PATTERN "^\/etc\/mapserver"

You need to be running the latest version for this to work as intended and
of course that's strongly recommended.

--Steve


On Thu, Jun 3, 2021 at 8:12 AM Jeff McKenna via mapserver-users <
mapserver-users@lists.osgeo.org> wrote:

> Hi David,
>
> MS4W also uses PCRE for its regex engine, so Windows users will soon be
> facing these same issues as you (I'll be making this as easy as possible
> for the new Windows users).
>
> So to answer your question: I believe most users aren't yet aware of
> what regex engine they use, and, also I believe that the PCRE regex
> engine is used more frequently in the MapServer community than what is
> believed.  (most automated tests do not use PCRE, for example, even
> though it is so commonly used)
>
> I'm not sure if I have the answer that you need, but I wanted to give a
> perspective from the Windows side.
>
> -jeff
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, MapServer Consulting and Training
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2021-06-03 9:29 a.m., David Pavlíček via mapserver-users wrote:
> > Hi Steve,
> > your pattern works like a charm... escaped hyphen was the issue. I
> > tested the previous regex with regex101.com  and
> it
> > matches with no problems against most of the available variants except
> > PCRE. Which regex engine is suitable for a test against MapServer?
> >
> > Thank you.
> >
> > st 2. 6. 2021 v 15:16 odesílatel Steve Lime  > > napsal:
> >
> > Hi David: Presumably the Docker image is running the most recent
> > version of 7.4 which would have that pull request applied. That
> > said, I don't think it's the culprit here and I have seen some
> > issues with -'s where the MS_MAP_PATTERN expression compiles fine
> > but doesn't match as expected. Re-writing the expression to move the
> > - character can help. Try this:
> >
> >
> >
>  
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$
> >
> > --Steve
> >
> > On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users
> >  > > wrote:
> >
> > Hello,
> > I'm using camptocamp/mapserver:7.4 docker image to run mapserver
> > on our servers and I have recently encountered this error:
> >
> > [warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web
> > application error. CGI variable "map" fails to validate.
> > 2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +] "GET
> >
>  
> /?map=/etc/mapserver/puobod/krpk-puobod-red.map&request=getcapabilities&service=WMS"
> >
> > In fact, any mapfile with hyphens won't work. They fail against
> > MS_MAP_PATTERN regex or something. This is strange because I
> > tested this regex and it works fine. Container MS ENV variables
> > look like this:
> >
> > MS_ERRORFILE=stderr
> >
>  
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
> > MS_DEBUGLEVEL=0
> > MS_MAPFILE=/etc/mapserver/mapserver.map
> >
> > Maybe something related to this PR:
> > https://github.com/MapServer/MapServer/pull/6314
> > 
> >
> > Any suggestions about that? Renaming project is not an option
> > because they are referenced in many places outside of our direct
> > reach (GIS clients, servers, etc)
> >
> > Thanks, David
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] CGI variable "map" fails to validate.

2021-06-02 Thread Steve Lime via mapserver-users
Hi David: Presumably the Docker image is running the most recent version of
7.4 which would have that pull request applied. That said, I don't think
it's the culprit here and I have seen some issues with -'s where the
MS_MAP_PATTERN expression compiles fine but doesn't match as expected.
Re-writing the expression to move the - character can help. Try this:


MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$

--Steve

On Wed, Jun 2, 2021 at 3:07 AM David Pavlíček via mapserver-users <
mapserver-users@lists.osgeo.org> wrote:

> Hello,
> I'm using camptocamp/mapserver:7.4 docker image to run mapserver on our
> servers and I have recently encountered this error:
>
> [warn] [pid 25] mod_fcgid: stderr: msCGILoadMap(): Web application error.
> CGI variable "map" fails to validate.
> 2098 - 172.17.0.1 - - [02/Jun/2021:04:57:42 +] "GET
> /?map=/etc/mapserver/puobod/krpk-puobod-red.map&request=getcapabilities&service=WMS"
>
> In fact, any mapfile with hyphens won't work. They fail against
> MS_MAP_PATTERN regex or something. This is strange because I tested this
> regex and it works fine. Container MS ENV variables look like this:
>
> MS_ERRORFILE=stderr
>
> MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][_A-Za-z0-9\-\.]+\/{1})*([_A-Za-z0-9\-\.]+\.map)$
> MS_DEBUGLEVEL=0
> MS_MAPFILE=/etc/mapserver/mapserver.map
>
> Maybe something related to this PR:
> https://github.com/MapServer/MapServer/pull/6314
>
> Any suggestions about that? Renaming project is not an option because they
> are referenced in many places outside of our direct reach (GIS clients,
> servers, etc)
>
> Thanks, David
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users