#!/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.