Tags:
create new tag
, view all tags

Bug: a better error message if the log file is unwriteable

Motivation

If somebody screws up the permissions on the logfile directory, then when trying to save a topic, it will appear to just hang.

Description

Dies with an error message if the logfile is unwriteable.

Documentation

None.

Examples

None.

Implementation

This is a very simple patch, changing only one line of code.

The error message that I chose might not have the exact wording that you would choose

It looked to me from a casual glance that there might be other opportunities to give meaningful error messages if files couldn't be written to.

Note: Patch is attached as http://www.twiki.org/p/pub/Codev/BetterErrorMessageIfLogFileUnwriteable/BetterErrorMessageIfLogFileUnwriteable.diff .

The patch is against the HEAD of CVS of Store.pm as of today, 9 June 2004, version 1.89.


Discussion:

Pretty simple:

     open( FILE, ">>$filename");
to
     open( FILE, ">>$filename") || die "The web server can't write to the file $filename.\n\nThis error is";


Whoops, I didn't realize this was better submitted as a BugReport! I changed it shortly after filing -- -- DS
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-08-24 - TWikiJanitor
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.