AwStats plugin for DA [Still in BETA]

mmx said:
Trying 2.1.5:

awstats successfully downloaded
plugin.tar.gz extracted
install.sh has been run:

Plugin Installed! Downloading latest version
Extracting
Extracted.. now Updating
Warning: fopen(wwwroot/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/update/patch.php on line 3
ERROR can't open awstats.pl
Removing all temp. files
Done.. updated to

Running the update script to replace current awstats binaries
Done running script.. Please verify by checking the version numbers on the bottom of the generated pages!

I see i'm not alone :(
 
nhwebgroup said:
I see i'm not alone :(

I fixed it :) by running /usr/local/directadmin/plugins/update/update.sh

Seems like this script is expecting you to have an older version of this plugin. Anyways, it's working for me now, albeit statistics take forever to update since my site is too bandwidth intensive for awstats...
 
I found a bug in the PATH in patch.php

CHANGE FROM
//$fp=fopen ("wwwroot/cgi-bin/awstats.pl","r");

TO:
$fp=fopen ("/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl","r");

this seamed to work.
 
nhwebgroup said:
I found a bug in the PATH in patch.php

CHANGE FROM
//$fp=fopen ("wwwroot/cgi-bin/awstats.pl","r");

TO:
$fp=fopen ("/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl","r");

this seamed to work.

curios could this be the cause of the 0 byte file at that location?

Testing 2.1.5 now.
 
awstats successfully downloaded
plugin.tar.gz extracted
update.sh has been run:

Plugin has been updated! Plugin Installed! Downloading latest version
Extracting
Extracted.. now Updating

ERROR can't open awstats.pl
Removing all temp. files
Done.. updated to

edit--

2.1.5 corrupt??

-rwx------ 1 diradmin diradmin 34349 Aug 19 22:16 plugin.tar.gz

is very small
 
Last edited:
welp guess i had better wait until 2.1.6 then since there are a couple non-worked out issues with this yet. Hopefully fusion will have it all fixed up shortly :)

-Justin
 
2.1.6

* This should resolve most issues with the location of awstats.pl


I didn't had that much time this weekend and could only test it on my CentOS servers.

This should hopefully be the last update :) So cross your fingers when installing for me ;)
 
Hum update ok, but a problem. When we update, awstats forget the tune (password by example) and gives awstats to all users. Is it possible, by default, to give awstats to nobody ? or better, plug awstats/da should remember last choice ^^
 
The problem is I change the .htpassword sometimes, so these updates don't come automaticaly. But I will look at it if I release another update and there is a .htaccess, to not overwrite it!
 
not sure if this is down to this one server, but now there is no errors except awstats is still 6.3 1800 even in the hooks dir.

awstats # tar -zxvf plugin.tar.gz
x admin/
x admin/index.html
x hooks/
x hooks/user_txt.html
x hooks/cgi-bin/
x hooks/cgi-bin/awredir.pl
x hooks/cgi-bin/awstats.none.conf
x hooks/cgi-bin/.htaccess
x hooks/cgi-bin/awstats_updateall.pl
x hooks/alldomains.php
x hooks/user_img.html
x hooks/admin_txt.html
x hooks/admin_img.html
x hooks/awstatsinstall.php
x hooks/update.sh
x images/
x images/link.jpg
x plugin.conf
x scripts/
x scripts/update.sh
x scripts/install.sh
x scripts/uninstall.sh
x scripts/correct.sh
x update/
x update/update.sh
x update/patch.php
x user/
x user/index.html
x user/options.php
x user/save.php

awstats.pl is missing (2.1.6) still the small tarball.

--edit--

I ran the update.sh which grabbed the files then ran awstatsinstall.php -fa it is all good now, on my system the automated running of update.sh must be failing.
 
Last edited:
Indeed this is strange :s It happened more times that the awstatsinstall.php script isn't ran :s (OS dependend maybe )

Chrysalis said:
not sure if this is down to this one server, but now there is no errors except awstats is still 6.3 1800 even in the hooks dir.

awstats # tar -zxvf plugin.tar.gz
x admin/
x admin/index.html
x hooks/
x hooks/user_txt.html
x hooks/cgi-bin/
x hooks/cgi-bin/awredir.pl
x hooks/cgi-bin/awstats.none.conf
x hooks/cgi-bin/.htaccess
x hooks/cgi-bin/awstats_updateall.pl
x hooks/alldomains.php
x hooks/user_img.html
x hooks/admin_txt.html
x hooks/admin_img.html
x hooks/awstatsinstall.php
x hooks/update.sh
x images/
x images/link.jpg
x plugin.conf
x scripts/
x scripts/update.sh
x scripts/install.sh
x scripts/uninstall.sh
x scripts/correct.sh
x update/
x update/update.sh
x update/patch.php
x user/
x user/index.html
x user/options.php
x user/save.php

awstats.pl is missing (2.1.6) still the small tarball.

--edit--

I ran the update.sh which grabbed the files then ran awstatsinstall.php -fa it is all good now, on my system the automated running of update.sh must be failing.
 
Is there a solution to automaticly activate awstats for new users that is are added to the server?

Today I login as admin in DA once a week and select all accounts and activates awstats on them...and sometimes I forget to do it.

Maybe there's a cron-job I can run like once a day? Anyone done a script like that?
 
GoranTornqvist said:
Is there a solution to automaticly activate awstats for new users that is are added to the server?

Today I login as admin in DA once a week and select all accounts and activates awstats on them...and sometimes I forget to do it.

Maybe there's a cron-job I can run like once a day? Anyone done a script like that?

Automaticaly give access to stats to new users

# cd /usr/local/directadmin/scripts/custom
# vi user_create_post.sh

Add the following to the new file or add the line if exists:

#!/bin/sh
echo $username >> /usr/local/directadmin/plugins/awstats/hooks/permissions.txt

(THERE'S NO NEWLINE AFTER $username !! just a space)

# save the file VI command ( 'ESC' then ':' then 'wq!' )
# chmod a+x user_create_post.sh

This should now automaticaly add new users to the permissions file!
 
I have another question :)
A few months ago we had the problem that a brazilian hacker group used a vulnerability in awstats.
We hadn't updated awstats on one server so some websites was hacked. All the hacked websites had awstats wide opened with no password protection.
This wouldn't have happened if awstats had password protection on by default. Is that possible to set in the plugin?
When awstats is created for a domain I want it default to be password protected with an unknown password for the user.
The user then has to use "Tune" to set a password, or they'll contact us and we'll tell them they'll have to set a password for their awstats.
Possible? :)
 
when is it supposed to update the awstats.pl file is it part of the plugin update process? because the awstats.pl file I have is still build 1800 v6.3

also I cant run directadmin/plugins/update/update.sh as the update directory doesnt exist.

any ideas?
 
Back
Top