Home: Perl Programming Help: Beginner:
I have a problem on Apache, when run Perl script



digioleg54
User

May 11, 2017, 6:17 AM


Views: 1969
I have a problem on Apache, when run Perl script

I have a problem with Apache on Linux. When I run the simple program, the error log sais:

Code
suexec failure: could not open log file 
fopen: Permission denied
failed to open log file /var/log/www/cgi_log: Permission denied (euid=218637)
failed whilst writing:
Exec format error: exec failed
Premature end of script headers


Could you please help me to solve the problem?

Thanks


Laurent_R
Veteran / Moderator

May 11, 2017, 10:04 AM


Views: 1958
Re: [digioleg54] I have a problem on Apache, when run Perl script

How could we possibly help you not seeing the script that you're running?


digioleg54
User

May 11, 2017, 10:06 AM


Views: 1957
Re: [Laurent_R] I have a problem on Apache, when run Perl script

The simple script is running from cgi_bin:


Code
#!/usr/bin/dwebenv perl 


my($lib_path,$data_path);
BEGIN{
$lib_path=$ENV{'DWEB_SITE_PATH'};
$data_path=$ENV{'DWEB_SITE_CGI_DATADIR'};
}
use lib $lib_path.'/lib/web';
use strict;
use warnings;

print "Content-type: text/html\n\n";
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks.";
my ($d,$m,$y) = (localtime)[3,4,5];
my $mdy = sprintf '%d/%d/%d', $m+1, $d, $y+1900;



digioleg54
User

May 11, 2017, 1:22 PM


Views: 1945
Re: [digioleg54] I have a problem on Apache, when run Perl script

Disregard please, we found everything, except one question, which I put separate