Hey
I am a total noob with CentOS
I have manages to get Apache, PHP and well I though Perl
But when I go to a page that has been written in Perl all I see is the Perl code
[code]
#!/usr/bin/perl
use strict;
use BSD::Resource;
setrlimit(RLIMIT_AS, 128000000, 1280000000);
setrlimit(RLIMIT_CPU, 120, 120);
use CGI;
use Cwd 'getcwd';
use IO::Handle;
STDOUT->autoflush(1);
my $cwd=getcwd();
my $root_path;
if($cwd=~m#^(/home/(?:sites|cluster-sites/\d+)/[\w\.\-]+/)#) {
$root_path=$1;
} else {
die
}
$0 = "awstats";
my $cgi=new CGI;
%ENV=(PATH=>'/bin:/usr/bin:/usr/local/bin', HTTP_HOST=>$ENV{HTTP_HOST});
$|=1;
print $cgi->header("text/html");
print "<html><head><title>AWStats</title></head><body>";
print "<p>Generating stats for the first time. Please wait, this can take a while.</p><p>";
my $pid=fork();
die unless defined $pid;
if(!$pid) {
# child
open(STDOUT, ">&STDERR");
exec("./awstats.pl","-config=pharmacy4meds.co.uk", "-update");
exit 1;
}
use POSIX ":sys_wait_h";
my $i = 0;
while(waitpid(-1, WNOHANG) <= 0) {
$i++;
print ".";
if($i % 100 == 0) {
print "<br/>\n";
}
sleep 1;
}
print "</p><p>Complete. You will be redirected to <a href='awstats.pl'>the stats page</a> in a moment.</p>";
print "<script type='text/javascript'>function onward() {location.href='awstats.pl'} setTimeout(onward, 3000)</script>";
print "</body></html>";
[/code]
All of the installs that I have done are strait out of the box, and I havent changed anything
Any help?
Perl on Centos 5
Perl on Centos 5
`yum install mod_perl` perhaps? Followed by a `service httpd restart`
-
- Posts: 2
- Joined: 2012/10/24 12:42:37
Re: Perl on Centos 5
I tried that yesterday
Installed mod_perl and restarted the service still the same
Installed mod_perl and restarted the service still the same
Re: Perl on Centos 5
What is your file called that you are serving? Where is it located?
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke