Re: print() on closed filehandle

2006-10-31 Thread Frank Wiles
On Mon, 30 Oct 2006 13:15:32 -0700 Harry Plate <[EMAIL PROTECTED]> wrote: > Peter, > > > > > You can also temporarily disable SELinux by doing: > > > > echo '0' > /selinux/enforce > > > > Bingo! That was it! > > So, I don't see any SELinux configuration (within Webmin, at least). > I need to

Re: print() on closed filehandle

2006-10-30 Thread Harry Plate
Peter, > > You can also temporarily disable SELinux by doing: > > echo '0' > /selinux/enforce > Bingo! That was it! So, I don't see any SELinux configuration (within Webmin, at least). I need to learn more about it ... How does one disable it at boot time? That would be a good temporary solut

Re: print() on closed filehandle

2006-10-30 Thread Peter Rosenthal
SELinux is certainly included in RHEL 4 (though it is an option at install time whether it is enabled or not). Check your message log for avc failures. e.g.:kernel: audit(1162240773.996:667): avc:  denied  { write } for  pid=23025 comm="httpd" name="dprof" dev=dm-0 ino=24282699 scontext=root:system

Re: print() on closed filehandle

2006-10-30 Thread Perrin Harkins
On Mon, 2006-10-30 at 12:47 -0700, Harry Plate wrote: > *** Cannot open log file, Permission denied at /var/www/cgi-bin/test.pl... [...] > Note the folder and file permissions are wide open; so I would next expect > that the unix fs is *not* the one that is complaining... I think it probably is yo

Re: print() on closed filehandle

2006-10-30 Thread Harry Plate
> You ought to test if the file is really open first, and you will hopefully > get a more helpful error message: > > open(LOGFILE, ">>junk.log") or die "Cannot open logfile, $!"; > Good suggestion; so I add the "die" and I get the error: *** Cannot open log file, Permission denied at /var/www/

Re: print() on closed filehandle

2006-10-30 Thread Clinton Gormley
what error is the open giving? > open (LOGFILE, ">>junk.log") ; open (LOGFILE, ">>junk.log") or die "Couldn't open junk.log for appending : $!"; Also, it may be that somewhere LOGFILE is defined as a constant, and so the bare filehandle LOGFILE is being interpreted as LOGFILE() Rather use

Re: print() on closed filehandle

2006-10-30 Thread Dondi M. Stroma
You ought to test if the file is really open first, and you will hopefully get a more helpful error message: open(LOGFILE, ">>junk.log") or die "Cannot open logfile, $!";

print() on closed filehandle

2006-10-30 Thread Harry Plate
(LOGFILE, ">>junk.log") ; Ea print on LOGFILE results in the error: ...print() on closed filehandle LOGFILE at /var/www/cgi-bin/test.pl The "WS" system has no problems writing to LOGFILE , whereas the enterprise system fails. The /var/log folder permissions are