/virtualmin-awstats/view.cgi : Missing Headers


I have centos 5.3 x86 and I have some problems with awstats and I get this error:

/virtualmin-awstats/view.cgi : Missing Headers

when I try to view awstats statistics I get big text: Missing Headers

Maybe this is something to do with it:

[04/Jan/2010:20:52:12 +0200] Perl module Authen::PAM needed for PAM is not installed : Can’t locate Authen/PAM.pm in @INC (@INC contains: /usr/libexec/webmin /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at (eval 10) line 1.
BEGIN failed–compilation aborted at (eval 10) line 1.

[04/Jan/2010:20:52:12 +0200] Continuing without the Authen::PAM perl module

now I have installed Authen::PAM using webmin–>others–>perl modules.

Is there any way to reinstall awstats correctly?

Well, the Authen::Pam error is just an unrelated (and harmless) Webmin warning.

Do you see anything in the Apache errors logs for that domain, in $HOME/logs/error_log?


it seems that I don’t have some awstats files or these files are not where they should be:

in on of my virtual server’s apache log I found:

[Sat Jan 09 12:40:30 2010] [error] [client] awstats.pl: /usr/share/awstats/wwwroot/cgi-bin/awstats.pl: /usr/bin/perl^M: bad interpreter: No such file or directory
[Sat Jan 09 12:40:30 2010] [error] [client] awstats.pl: line 2: /usr/share/awstats/wwwroot/cgi-bin/awstats.pl: Success
[Sat Jan 09 12:40:30 2010] [error] [client] Premature end of script headers: awstats.pl

deleted (double post)

Hrm, it’s possible your awstats program is corrupted.

What does this show:

rpm -qa | grep awstats

I enabled some third-party repositories…


Yeah it sounds like something in the awstats.pl program is corrupted.

Had it ever worked with that particular awstats version?

If so, you may want to try reinstalling it.

If not, something about that particular package may be broken… you may want to install a version of that which doesn’t come from a third-party repo.


I am little bit afraid of deleting awstats (that awstats installation which is from from epel repository I think…):

Package Arch Version Repository Size

awstats noarch 6.95-1.el5.rf installed 3.0 M
Removing for dependencies:
virtualmin-base noarch 1.0-61.rh installed 0.0

Transaction Summary
Install 0 Package(s)
Update 0 Package(s)
Remove 2 Package(s)

YUM wants also delete virtualmin-base. Will it affect Virtualmin?

P.S I did not do anything but now I don’t have missing headers error.

Now I have:

Warning: Can’t read file “mime.pm” (mime detection will not work correctly).
Check if file is in “/usr/share/awstats/wwwroot/cgi-bin/lib” directory and is readable.

Warning: Can’t find language files for “lv”. English will be used.

In /usr/share/awstats/wwwroot/cgi-bin directory there is only one awstats.pl file and nothing more. I remember that I copied this awstats.pl file from another virtualmin installation because I got error about awstats.pl not found.

Now it seems I need to get only lib directory…

I wouldn’t do anything that attempts to remove virtualmin-base.

However, yum supports several options that would allow you to overwrite an existing package with another. Running yum with the --oldpackage option is one example.