[MS4W-Users] Problem with MS_MAPFILE
kari at hoijarvi.org
kari at hoijarvi.org
Wed Jul 19 18:37:25 EDT 2017
Problem with MS_MAPFILE.
This is the second time I installed MapServer. The first time, with
previous version, was easy. But now I don't understand what's going wrong.
The map itself works fine:
http://webapps.datafed.net:8082/cgi-bin/mapserv.exe?map=E:/dvoy_services/mapserver/MapImage.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=Getmap&FORMAT=image/png&LAYERS=World_bdr,US_bdr&BBOX=-126,24,-65,52&WIDTH=700&HEIGHT=350&BGCOLOR=0xF0FFE1&SRS=EPSG:4326
As you can see, I'm on MS Windows, 2012 server.
To avoid the map parameter, I added the next to
C:\ms4w\Apache\conf\httpd.conf
SetEnv MS_MAPFILE="E:/dvoy_services/mapserver/MapImage.map"
And try this:
http://webapps.datafed.net:8082/cgi-bin/mapserv.exe?SERVICE=WMS&VERSION=1.1.1&REQUEST=Getmap&FORMAT=image/png&LAYERS=World_bdr,US_bdr&BBOX=-126,24,-65,52&WIDTH=700&HEIGHT=350&BGCOLOR=0xF0FFE1&SRS=EPSG:4326
The surprising result is:
msLoadMap(): Regular expression error. MS_DEFAULT_MAPFILE_PATTERN
validation failed.
That's strange. It ends with .map. I'll add
SetEnv MS_MAPFILE_PATTERN=.*
(documentation does omit DEFAULT from the variable.)
Result:
msLoadMap(): Unable to access file.
('E:/dvoy_services/mapserver/MapImage.map'=)
What's that '=' sign at the end? What's going on here?
I've tried single quotes and without quotes, but no difference. I'm at my
wits end. Last time I did this it worked with first try, now I can't get
it to work no matter what I do. I'd be very surprised if this was broken
with the last upgrade, but I otherwise I have no idea what could I be
doing wrong.
Thanks, Kari
More information about the MS4W-Users
mailing list