Win XP and paths in the .map file
Manuel Alonso
manuel.alonso at ERMAPPER.CO.UK
Fri Dec 3 05:36:11 PST 2004
Ed and Jacob:
Many thanks for your help.
At the end, the problem was not caused by permissions or IIS/XP
configuration. One of the data files was not present in the directory where
the shapefiles are (my fault; I did not copy it with the rest). The file was
the one with .shx extension. The application works now either with shapepath
absolute or relative.
My mapserver directory is under the web root and have execute permissions
using IIS. I have set up a tmp directory that have IIS write permissions and
also IUSR_ user account write permissions given at 'Windows level'
(directory right-click -> Properties -> etc.).
Thanks again,
Manuel Alonso
ER Mapper
Blenheim House
Crabtree Office Village
Eversley Way, Egham
Surrey, TW20 8RY, UK
Telephone: +44 1784 430-691
Facsimile: +44 1784 430-692
-----Original Message-----
From: Jacob Delfos [mailto:jacob.delfos at MAUNSELL.COM]
Sent: 03 December 2004 00:44
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Win XP and paths in the .map file
Manuel,
I have had similar problems using IIS 6 on Windows Server 2003. The
configuration of IIS is a bit confusing, and I haven't figured out the
problem yet. Only thing you could check is to make sure that you got your
execution permissions set up correctly. You may have to add your mapserver
executable to the pool of programs that is allowed to run on the server, and
then also specify for each directory that mapserver is allowed to run in
there (it's kind of doubled-up in IIS). Aside from that it's still a mystery
to me. I use the a similar configuration on win2k without problems. XP and
2003 server have a different configuration. Specifying IUSR permissions does
not seem to suffice.
I would suggest you make your shapepath absolute, though. To make sure there
is no confusion about relativity to the webroot, or the executable path.
Jacob
P.S. be aware of the 10 user connection limit with IIS, on a non-server
version of windows. May be better of using apache.
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Ed McNierney
Sent: 3 December 2004 02:04
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Win XP and paths in the .map file
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