[Mapserver-users] Relative Paths vs. Absolute Paths

Chip Hankley Chip.Hankley at rmtinc.com
Thu Oct 16 06:58:32 PDT 2003


Todd,

I think you might be missing something on how to construct relative
paths. First, try an absolute path just to make sure it works:

#NOTE - Backslashes for a DOS style path, don't need a trailing slash
either. Just make this the path to the tmp directory you've created for
your images.
IMAGEPATH "C:\inetpub\wwwroot\data\tmp"
#NOTE- Because this is a URL, you need to use forward slashes. This
path needs to be relative from your web root. So, if you have the basic
IIS web structure, where wwwroot is the root folder of the web server,
then "/tmp/" indicates that the folder tmp is a child of the folder
wwwroot. However, your IMAGEPATH statement makes it look like tmp is a
child of a folder called "data". If this is the case, then your imageurl
should be "/data/tmp/".
IMAGEURL "/tmp/"

Try to get this working first. You'll need to make sure that the folder
"tmp" has write permission for the default web user.

Next you can try messing with relative paths...
If the mapfile your working on resides in DATA, and the image tmp
directory is in TMP, a child directory of data, then the relative
designation would be:
  IMAGEPATH "\tmp"

Same situation, but the tmp directory is a sibling directory of data:
  IMAGEPATH "..\tmp"

Or... what if it looks like this:

inetpub
  |_wwwroot
           |_MapServer
           |        |_Test
           |_tmp

If your mapfile is in TEST, then the relative path to tmp would be:
  IMAGEPATH "..\..\tmp"

HTH...

Chip

Outgoing messages, along with any attachments, are scanned for viruses at RMT prior to sending.
------------------------------------------------------------------------------
NOTICE--This email may contain confidential and privileged information 
for the sole use of the intended recipient.  Any review or distribution
by others is strictly prohibited.  If you are not the intended recipient,
please contact the sender immediately and delete all copies.



More information about the MapServer-users mailing list