Rod Brick wrote:

I'm trying to write for a file from a mod_perl script.  I can write
successfully to a file located in /tmp, but I cannot write to
the dir containing the script, nor to the apache logs dir.  How can
this be accomplished?  Is there a setting in httpd.conf that I
need to specify?  Is it a file permissions problem?  I don't want to
make the script dir world read/writable.  Would the Apache::Log
interface allow me to write to my own file?  My code looks something
like the following:

open(LOG, ">>/usr/local/apache/htdocs/aws/perl/rod.log") || print
"script.pl: Can't write to log file.";
print LOG "hello\n";
close LOG

change it to open(LOG, ">>/usr/local/apache/htdocs/aws/perl/rod.log") || print "script.pl: Can't write to log file : $! "; print LOG "hello\n"; close LOG

And at least it'll tell yuo why it can't write to the file :)

Carl





Reply via email to