Opened 15 years ago

Closed 13 years ago

#2853 closed enhancement (fixed)

MS_ERRORFILE does not accept relative path

Reported by: ben Owned by: dmorissette
Priority: low Milestone: 6.0 release
Component: MapServer CGI Version: 5.2
Severity: normal Keywords: error logfile debug config
Cc: jmckenna, dmorissette, sdlime, sholl

Description

When using CONFIG to set the location for an error log, it is not possible to use a relative path :

Doesn't work:

CONFIG "MS_ERRORFILE" "mserr.log"

Works:

CONFIG "MS_ERRORFILE" "/Users/19022662/Sites/marketprices/mapserver/mserr.log"

This is being reported only because it is inconsistent with other file references in the Mapfile (and took me some time to realise this), which will accept a relative reference (relative to the mapfile).

This is not important (if you know it doesn't accept a relative reference), but vaguely annoying when developing / debugging across different platforms.

Suggestions :

Short term - Update documentation to make it clear that the reference must be an absolute reference.

Longer Term - from Daniel Morissette's list response (9 January 2009):

"look at the implications of supporting relative paths in all possible scenarios and see if this could safely be added. i.e. it may be possible to get predictable results with a relative path only when setting MS_ERRORFILE in the mapfile but not when setting it via an environment variable, we'll have to see."

cheers

Ben

Attachments (1)

ms-svn-patch_msSetErrorFile_relative.patch (511 bytes ) - added by ejn 13 years ago.
Patch to set relative path "." in mapserv.c;msSetErrorFile

Download all attachments as: .zip

Change History (10)

comment:1 by dmorissette, 15 years ago

Cc: jmckenna dmorissette added
Milestone: 5.4 release

comment:2 by dmorissette, 15 years ago

Cc: sdlime added
Owner: changed from sdlime to dmorissette

comment:3 by dmorissette, 15 years ago

Note that the docs have been updated in ticket #2854 to clarify the absolute path requirement.

comment:4 by dmorissette, 15 years ago

Milestone: 5.4 release6.0 release

comment:5 by bj, 13 years ago

Cc: sholl added

Ping, is there any progress to get this feature it in MapServer 6.0?

We find this feature really useful.

Any comment from a dev would be helpful gain momentum here.

Best

bjoern

comment:6 by dmorissette, 13 years ago

Status: newassigned

I have added this in SVN trunk r11128 (will be in MS 6.0 beta1).

Note that relative values for MS_ERRORFILE are supported only when set through a CONFIG directive in a mapfile. Setting MS_ERRORFILE through an environment variable still requires an absolute value.

Keeping ticket open for docs update

by ejn, 13 years ago

Patch to set relative path "." in mapserv.c;msSetErrorFile

comment:7 by ejn, 13 years ago

When compiling with the flag (unsafe) MS_ENABLE_CGI_CL_DEBUG_ARGS then msSetErrorFile was still called with a single argument (no pszRelToPath). The attached patch (against r11298) sets the pszRelToPath to ".", which seems like the "expected" behaviour in this case.

comment:8 by dmorissette, 13 years ago

Good catch. Thanks. Fixed in r11305 (will be in 6.0.0-beta3).

Still pending docs update.

comment:9 by dmorissette, 13 years ago

Resolution: fixed
Status: assignedclosed

Committed doc updates for this to map.txt and debugging.txt in r11306. Closing.

Note: See TracTickets for help on using tickets.