1
votes

I have a perl webapp that works fine on the server but not on my local machine.

Apache logs show (among other errors):

Permission denied at /home/mywebapp/dev/www/index.cgi line 318.
End of script output before headers: index.cgi

Line 318 in index.cgi:

our @gr;
eval('require Groups;');
#close STDERR; <<<< commented
open STDERR, '>1' or die $!;  <<<< line 318

I'd appreciate any help. Thanks!

1
Your comment // commented is not a comment in perl. Only a hash sign # is a comment. See perlsyn - simbabque
yes, its not in the file, I just put it here for clarity - eozzy

1 Answers

7
votes

STDERR shouldn't be '>1' - it should be '>&1'. The way it's written now, your script will try to create a file called 1 in a directory where the web server user doesn't have write permission.