Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS_ERRORFILE does not accept relative path #2853

Closed
mapserver-bot opened this issue Apr 3, 2012 · 7 comments
Closed

MS_ERRORFILE does not accept relative path #2853

mapserver-bot opened this issue Apr 3, 2012 · 7 comments
Assignees
Milestone

Comments

@mapserver-bot
Copy link

Reporter: ben
Date: 2009/01/10 - 03:22
Trac URL: http://trac.osgeo.org/mapserver/ticket/2853
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

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2009/01/21 - 20:10
Note that the docs have been updated in ticket #2854 to clarify the absolute path requirement.

@mapserver-bot
Copy link
Author

Author: bj
Date: 2011/03/09 - 10:52
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

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2011/03/09 - 21:41
I have added this in SVN trunk 58fd421 (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

@mapserver-bot
Copy link
Author

Author: ejn
Date: 2011/03/22 - 08:38
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 MapServer/msautotest_DEPRECATED@8e5fc71 (r11298)) sets the pszRelToPath to ".", which seems like the "expected" behaviour in this case.

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2011/03/23 - 02:38
Good catch. Thanks. Fixed in 6a18a59 (r11305) (will be in 6.0.0-beta3).

Still pending docs update.

@mapserver-bot
Copy link
Author

Author: dmorissette
Date: 2011/03/23 - 02:55
Committed doc updates for this to map.txt and debugging.txt in MapServer/MapServer-documentation@150f524 (r11306). Closing.

@mapserver-bot
Copy link
Author

attachment http://trac.osgeo.org/mapserver/attachment/ticket/2853/ms-svn-patch_msSetErrorFile_relative.patch :

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

@ghost ghost assigned dmorissette Apr 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants