On Sun, 2004-01-11 at 11:47, zentara wrote:
> On Sun, 11 Jan 2004 06:10:32 EST, [EMAIL PROTECTED] wrote:
> 
> >#!/usr/bin/perl -w
> >use strict;
> >BEGIN{open(STDERR, ">./err.txt")}
> >print "Content-Type: text/html\n\n";
> >foreach my $key (sort keys %ENV) {
> >     print "\$ENV{$key} = $ENV{$key}<br/>\n";
> >}
> >
> >None of my scripts are functioning on my new server.  The BEGIN statement 
> >doesn't write err.txt
> >But it does function from a shell.  I also changed the code thinking it was a 
> >header problem.  But it does not function either.  
> >#!/usr/bin/perl -w
> >use strict;
> >BEGIN{open(STDERR, ">./err.txt")}
> >use CGI;
> >my$q = CGI::new();
> >print $q->header;
> >foreach my $key (sort keys %ENV) {
> >     print "\$ENV{$key} = $ENV{$key}<br/>\n";
> >}
> >
> >The permissions are set to 0755.  I thought maybe the .pl extention wasn't 
> >recognized so I changed it to cgi,  No such luck.
> >I'm out of my bag of tricks.  My provider isn't responding to my emails.  I'm 
> >guessing apache isn't configured right.
> 
> Your apache is probably set up to run as nobody::nogroup, or some
> similar lowest permission user::group.
> 
> So your directory has to be "world-writable" for apache to write to it,
> or 777.  It runs from the shell, because you are logged in as a user,
> and 755 will work.

Setting anything world writable is dangerous.  Remember to take proper
precautions, like making the directory inaccessible through apache,
and/or throw it in a database instead.

-Dan 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to