The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HOW TO: Update to Awstats 6.5

Discussion in 'General Discussion' started by typhon, Apr 21, 2006.

  1. typhon

    typhon Well-Known Member

    Joined:
    Feb 17, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    This is actually extremely simple:

    1) Download 6.5 from sourceforge:
    http://prdownloads.sourceforge.net/awstats/awstats-6.5.tar.gz
    2) Extract awstats.pl file
    3) Open awstats.pl and find the following line:
    Code:
    else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
    
    replace it with:
    Code:
    	else {
    		my $homedir = (getpwuid($>))[7];
    		my $awdir = "$homedir" . "/tmp/awstats/"; if ($ENV{'AWSTATS_SSL_DIR'}) { $awdir .= "ssl/"; }
    		@PossibleConfigDir=("$DIR",$awdir,"/etc/opt/awstats","/etc/awstats","/etc","/usr/local/etc/awstats");
    	}
    
    4) Find this line:
    Code:
    warning("$message");
    
    comment it out to:
    Code:
    #warning("$message");
    
    5) Upload to your webserver
    6) move the old awstats.pl file:
    Code:
    mv /usr/local/cpanel/3rdparty/bin/awstats.pl /usr/local/cpanel/3rdparty/bin/awstats.pl.bak
    
    7) Move the new one in place:
    Code:
    mv /path/to/awstats.pl /usr/local/cpanel/3rdparty/bin/awstats.pl
    
    8) Set proper permissions:
    Code:
    chown root:root /usr/local/cpanel/3rdparty/bin/awstats.pl
    chmod 0755 /usr/local/cpanel/3rdparty/bin/awstats.pl
    

    You should be all good to go :)
     
  2. typhon

    typhon Well-Known Member

    Joined:
    Feb 17, 2004
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Here is the diff file:
    Code:
    1135c1135,1140
    < 	else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
    ---
    > 	else {
    > 		my $homedir = (getpwuid($>))[7];
    > 		my $awdir = "$homedir" . "/tmp/awstats/"; if ($ENV{'AWSTATS_SSL_DIR'}) { $awdir .= "ssl/"; }
    > 		@PossibleConfigDir=("$DIR",$awdir,"/etc/opt/awstats","/etc/awstats","/etc","/usr/local/etc/awstats");
    > 	}
    > 	#else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
    2237c2242
    < 						warning("$message");
    ---
    > 						#warning("$message");
    
     
Loading...

Share This Page