I have webalizer2.0 installed.

I tried setting up a cronjob that ran once an hour but all I get is an email tlling me that the job failed.

Webalizer :-
Running the Webalizer

The Webalizer was designed to be run from a Unix command line prompt or
as a cron job. There are several command line options which will modify
the results it produces, and configuration files can be used as well.
Errrrmmmm.... I would disagree at this point on the claim that it runs as a cron job. The cronjob was set and reports a success in setting the job but all I get is an email with the error:-

Died at /home/sites/{****.***.**}/public_html/stats/index.cgi line 15.

and looking at the index.cgi script line 15 says :-
this is par of a conditional
if($cwd=~m#^(/home/(?:sites|cluster-sites/\d+)/[\w\.\-]+/)#) {
} else {
So I assume that the cronjob is failing because of this conditional.

Any ideas on how to get this webalizer running as the help, FAQ's and help site do not cover this. Going to the help forum, it does not exist. The other help is on a yahoo groups page which I have not heard anything from in a few days.

The full CGI is
#!/usr/bin/perl -w
use strict;
use BSD::Resource;
setrlimit(RLIMIT_AS, 128000000, 1280000000);
setrlimit(RLIMIT_CPU, 120, 120);
use CGI;
use Cwd 'getcwd';
use IO::Handle;
my $cwd=getcwd();
my $root_path;
if($cwd=~m#^(/home/(?:sites|cluster-sites/\d+)/[\w\.\-]+/)#) {
} else {

my $cgi=new CGI;
%ENV=(PATH=>'/bin:/usr/bin:/usr/local/bin', HTTP_HOST=>$ENV{HTTP_HOST});
my $pid=open(CHILD, "-|");
die unless defined $pid;
if(!$pid) {
	# child
	# Get the mtime of webalizer.current for later...
	my $current_mtime;
	my @cstat=stat("webalizer.current");
	if(@cstat) {
	} else {

	my %files;
	my @poss_files=<$root_path/logs/*-access_log{,.*}>;
	for my $poss_file (@poss_files) {

		my $sort_fn=join "", reverse split(//, $poss_file);
		$sort_fn=~s/^(zg|2zb)\.//; # Ignore compression stuff
		$sort_fn=~s/^(\D)/0.$1/; # Make sure all are numbered.

		# Use timestamp for emergency sort order
		my @stat=stat($poss_file);
		next unless @stat;

		# Don't bother looking at obviously-unchanged files
		next if $stat[9]<$current_mtime;

	# We want high-numbered ones first
	for(reverse sort keys %files) {
		system("webalizer","-D", "dns.cache","-n", $ENV{HTTP_HOST}, $files{$_});
	exit 0;
local $/=undef;
my $data=<CHILD>;
close CHILD;
if($data) {
	print STDERR $data;
print $cgi->redirect("index.html");
What would I need to do to stop this CGI from stopping at line 15.

The webalizer is a one click install through the web host CP, I have no access to the routine other than the web interface. As this routine is running every hour as asked, it would be the index.cgi thats the issue.

Any ideas?