From: Eric D. <eri...@ja...> - 2002-08-13 02:07:31
|
Jamie McCarthy wrote: >What this tells me is that the open() calls which are intended to >open files for input, are only opening them for output. This is >bizarre and I don't know why it's happening. It's not just one >call because it happens in two open() calls that have nothing to >do with each other. And bizarrely, the open() call (at least the >one I wrote, in freshenup.pl line 198) does not return an error. > >Looking up the error (Camel 3rd ed., p. 942) doesn't tell me >anything I didn't already guess. It looks for all the world like >the filehandle was opened for writing instead of reading, but the >code is very clear: > > if (!open(my $cchp_fh, "<", $cchp_file)) { > warn "cannot open $cchp_file for reading, $!"; > } else { > my $cchp = <$cchp_fh>; > >My best guess is that you want to check permissions on the >site/*/logs directory and maybe check how its filesystem is >mounted. > > Um, the logs directory seems fine. Logs are getting written to, and that test.pl program works fine there. Prints out BAR >If that doesn't help (or if it does!) let us know what version of >unix you're running. What does this test output? It should >print "bar". Does it work when you run it in the site/*/logs dir >with the permissions of your slashd user? > >#!/usr/bin/perl -w >use strict; >open(my $fh, ">", "foo") or die "no write, $!"; >print $fh "bar\n"; >close $fh; >open($fh, "<", "foo") or die "no read, $!"; >my $line = <$fh>; >close $fh; >print $line; > I'm running FreeBSD 4.6.1. I haven't changed the filesystem or anything. What about the error about "Can't locate object method "request" via package "Apache"" errors? that is very strange. And the site runs fine, just slashd doesn't work. Freshenup doesn't work. I can still post comments, and submit stories. All that works. |