Win XP and paths in the .map file

Ed McNierney ed at TOPOZONE.COM
Thu Dec 2 13:04:22 EST 2004


You are right in thinking that this is probably a permissions problem.
Be sure that the IUSR account has read access to that particular file; I
think permission settings are the most common cause of problems when
migrating from one machine to another "identical" one.

Separately, it might not be the best idea to store your shapefiles in
the wwwroot tree if you want to protect them from being accessed outside
of MapServer.  It's usually wise to place MapServer's data files safely
outside any place that grants access to Web users.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242  

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Manuel Alonso
Sent: Thursday, December 02, 2004 11:03 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Win XP and paths in the .map file

Good afternoon:

I have been running MapServer 4.2.0 in Windows 2K and that works OK. I
have copied my application to Windows XP SP2 and configured all the
permissions, etc. as I did on Windows 2K, and now it seems that
MapServer is unable to read the paths from in the .map file. The .map
file contents
are:

NAME satgeobase
 SHAPEPATH "shapefiles/satgeobase"
 UNITS meters
 IMAGECOLOR 255 255 255
 TRANSPARENT ON
 SYMBOLSET symbols/symbols.sym

LAYER
 DEBUG on
 NAME countries
 TYPE polygon
 STATUS ON
 DATA "cntry98"

  CLASS
   NAME "Country outline"
  COLOR 255 255 255
  OUTLINECOLOR 255 255 0
  END
END

END

If I type the following line in Internet Explorer:

http://127.0.0.1/mapserver/mapserv.exe?
map=c:\Inetpub\wwwroot\satgeobase.map&mode=map&layer=countries&imgsize=8
00+
400&mapext=-180+90+180+-90

Map Server returns:

msDrawMap(): Image handling error. Failed to draw layer named
'countries'.
msSHPOpenFile(): Unable to access file. (c:\Inetpub\wwwroot\cntry98)
msSHPOpenFile(): Unable to access file.
(c:\Inetpub\wwwroot\shapefiles/satgeobase/cntry98)

If I change the SHAPEPATH line to SHAPEPATH "shapefiles\satgeobase\",
then the result is:

msDrawMap(): Image handling error. Failed to draw layer named
'countries'.
msSHPOpenFile(): Unable to access file. (c:\Inetpub\wwwroot\cntry98)
msSHPOpenFile(): Unable to access file.
(c:\Inetpub\wwwroot\shapefiles\satgeobase\cntry98)

I have tried to use double backslash, double forwardslash and many
combinations, but it seems that MapServer.exe cannot find the shape
files.
The shapefiles exist, names and paths are correct, the default firewall
that XP sets up is disabled, and I have even given administrative rights
to the IUSR_<> user, just in case. I get the same result, the same
answer that MapServer gives when the files do not exist.

Does anyone know if this is a known problem? Any ideas?

Thanks very much in advance,

Manuel



More information about the mapserver-users mailing list