AwStats plugin for DA [Still in BETA]

Wow, once a minute will bring a server to it's knees. :)

Check your cron. I belive you have an * out of place. Mine looks like this:

PHP:
# MIN   HOUR    DAY     MONTH   DAYOFWEEK       COMMAND
1       2,3,4,5,10,12,14,16,18,20,22    *       *       *               /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl

I run every 2 hours between 2AM and 9PM My machine does a lot of overnight processing so I don't want to compute stats during that window.

HTH,
=C=
 
Last edited:
Do you know which file this would be located in? so that I may update it?

OxnardMontalvo said:
Wow, once a minute will bring a server to it's knees. :)

Check your cron. I belive you have an * out of place. Mine looks like this:

PHP:
# MIN   HOUR    DAY     MONTH   DAYOFWEEK       COMMAND
1       2,3,4,5,10,12,14,16,18,20,22    *       *       *               /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats_updateall.pl now -awstatsprog=/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl

I run every 2 hours between 2AM and 9PM My machine does a lot of overnight processing so I don't want to compute stats during that window.

HTH,
=C=
 
for some reason it is not allowing new accounts access to awstats.

is it possable to manually setup awstats for an account?

I *think it might be because they are located on the second drive.
 
malachor said:
for some reason it is not allowing new accounts access to awstats.

is it possable to manually setup awstats for an account?

I *think it might be because they are located on the second drive.

I am having this same problem on a new server installation.

AWStats appears to install fine, but when you try to access the stats page, it gives you a 403 error.

any ideas fusionictnl ??

Thanks
GG
 
gadgetsguy said:
I am having this same problem on a new server installation.

AWStats appears to install fine, but when you try to access the stats page, it gives you a 403 error.

any ideas fusionictnl ??

Thanks
GG
'

Well.. run --- >
PHP:
 /usr/local/directadmin/plugins/awstats/update/update.sh
Then it will work.

BTw.. thax for the script man, I just found it before I was doing manual install. Great work though !
 
Last edited:
I installed the plugin and it appears to have installed properly.

I run update.sh and get the following output:

----------------------------------------------------------------------
Checking for latest version<BR>
...
egrep: invalid option -- o
egrep: invalid option -- o
Usage: egrep [OPTION]... PATTERN [FILE]...
Usage: egrep [OPTION]... PATTERN [FILE]...
Try `egrep --help' for more information.
Try `egrep --help' for more information.
Updating to <BR>
Downloading <BR>
--17:18:06-- http://awstats.sourceforge.net/files/awstats-.tar.gz
=> `/usr/local/directadmin/plugins/awstats/update/awstats.tgz'
Resolving awstats.sourceforge.net... done.
Connecting to awstats.sourceforge.net[66.35.250.209]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
17:18:06 ERROR 404: Not Found.

Extracting<BR>
./update.sh: /bin/tar: not found
Extracted.. now Updating<BR>
Awstats extracted in /usr/local/directadmin/plugins/awstats/update/awstats-<BR>
cd: can't cd to /usr/local/directadmin/plugins/awstats/update/awstats-
Copying awstas /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/cgi-bin/awstats.pl to basedir
cp: /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/cgi-bin/awstats.pl: No such file or directory
Patched..<BR>
cp: /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/cgi-bin/lib: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/cgi-bin/lang: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/icon: No such file or directory
cp: /usr/local/directadmin/plugins/awstats/update/awstats-/wwwroot/cgi-bin/plugins: No such file or directory
Removing all temp. files<BR>
Updating all user files..<BR>

Done.. updated to <BR>
----------------------------------------------------------------------


As the end user I select Install AWStats on this domian - I then get: (actual domain removed)

----------------------------------------------------------------------
Checking if there is already something installed..
AwStats Directory already exists on domain
Checking if awstats files are available Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 48 Error linking lib dir /home/username/domains/domain.com/public_html/awstats/lib from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/lib Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 53 Error linking icon dir /home/username/domains/domain.com/public_html/awstats/icon from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/icon Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 58 Error linking lang dir /home/username/domains/domain.com/public_html/awstats/lang from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/lang Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 63 Error linking plugin dir /home/username/domains/domain.com/public_html/awstats/plugins from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/plugins
Checking for AwStats itself
Going to install the awstats.pl
Warning: copy(/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 77 Error linking awstats.pl /home/username/domains/domain.com/public_html/awstats/awstats.pl from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl
(Re-)Activating CGI for dir
Ok .htaccess already exists let's delete it..Deleted!
Doing an extra permission setting through shell..+(Re-)Setting permissions
Warning: chmod(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 101 Warning: chown(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 102 Doing an extra permission setting through shell..Done
Now (re-)creating your configuration file.
Config file has been created and your statistics are now setup!

You can now view the statistics for your domain at: domain.com/awstats/
----------------------------------------------------------------------

Trying to view the AWStats page for the domain returns a 403 Forbidden.


If I manually create the links between the user html dir and the plugin I get to the AWStats page with this displayed at the top:

----------------------------------------------------------------------
Warning: Can't find language files for "en". English will be used.
Warning: Can't read file "status_http.pm" (status http detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "search_engines.pm" (search engines detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "domains.pm" (domains detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "operating_systems.pm" (operating systems detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "robots.pm" (robots detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "browsers.pm" (browsers detection will not work correctly).
Check if file is in "./lib" directory and is readable.
Warning: Can't read file "mime.pm" (mime detection will not work correctly).
Check if file is in "./lib" directory and is readable.
----------------------------------------------------------------------


This is on a FreeBSD server - would that make a difference?
 
I have the same problem as brundle (and others).

Neither the plugin nor the update.sh actually installs awstats.pl.

I am on FreeBSD 5.4.

Has anyone ben able to install the latest (2.1.9) to install correctly on FreeBSD 5.x?
 
I did run /usr/local/directadmin/plugins/awstats/hooks/awstatsinstall.php -af

And i don't get output... I updated the version with your script:

/usr/local/directadmin/plugins/awstats/update/update.sh

But i still have version 6.4... And the images aren't working... I deleted and un-installed awstats and reinstalled and then updated with the above command, but still have version 6.4 :(

Edit: Centos 3.4
 
Last edited:
Maybe this has been answered, but with 50 pages, not gonna read it all...

But is there a way to remove the "Update Now" function so that users can't perform it?
 
Did I do something wrong?

-Jim

PHP:
Checking if there is already something installed..
AwStats Directory already exists on domain
Checking if awstats files are available Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 48 Error linking lib dir /home/allout/domains/alloutclicks.com/public_html/awstats/lib from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/lib Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 53 Error linking icon dir /home/allout/domains/alloutclicks.com/public_html/awstats/icon from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/icon Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 58 Error linking lang dir /home/allout/domains/alloutclicks.com/public_html/awstats/lang from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/lang Warning: symlink(): File exists in /usr/local/directadmin/plugins/awstats/user/index.html on line 63 Error linking plugin dir /home/allout/domains/alloutclicks.com/public_html/awstats/plugins from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/plugins
Checking for AwStats itself
Going to install the awstats.pl
Warning: copy(/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 77 Error linking awstats.pl /home/allout/domains/alloutclicks.com/public_html/awstats/awstats.pl from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl
(Re-)Activating CGI for dir
Ok .htaccess already exists let's delete it..Deleted!
Doing an extra permission setting through shell..+(Re-)Setting permissions
Warning: chmod(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 101 Warning: chown(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 102 Doing an extra permission setting through shell..Done
Now (re-)creating your configuration file.
Config file has been created and your statistics are now setup!
 
The instructions on how to remove the Update now are in the awstats docs (awstats.sf.net) It's in the config file.

NOTE: Every time the awstats plugin is reinstalled you get a fresh config file for each domain. I've taken to putting all my custom settings in an include and then just adding it to the end of the config file. Saves having to re-do it every time a domain has custom settings.

The symlink problem really looks like a permissions problem to me. I didn't write the plugin, but I wrote a small piece of code that goes with it. It's hard for me to tell whether that's coming from my code or not. (It was over a year ago) Did you get that from upgrading the plugin (i.e. in DA) or did you get that from running the command line tool?

=C=
 
A bug possibly? I have this on another server works beautifully. However I recently purchased a new server with a slightly different partition creation (intead of /home it is /usr/home).

I recieve the following error:
Setting Directory PermissionsChecking if awstats files are availableError linking lib dir /home/xxxx/domains/xxxx.com/public_html/awstats/lib from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/libError linking icon dir /home/xxxx/domains/xxxx.com/public_html/awstats/icon from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/iconError linking lang dir /home/xxxx/domains/xxxx.com/public_html/awstats/lang from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/langError linking plugin dir /home/xxxx/domains/xxxx.com/public_html/awstats/plugins from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/plugins
Checking for AwStats itself
Going to install the awstats.pl
Warning: copy(/usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl): failed to open stream: No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 77 Error linking awstats.pl /home/xxxx/domains/xxxx.com/public_html/awstats/awstats.pl from /usr/local/directadmin/plugins/awstats/hooks/cgi-bin/awstats.pl
(Re-)Activating CGI for dir
Doing an extra permission setting through shell..+(Re-)Setting permissions
Warning: chmod(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 101 Warning: chown(): No such file or directory in /usr/local/directadmin/plugins/awstats/user/index.html on line 102 Doing an extra permission setting through shell..Done
Now (re-)creating your configuration file.
Config file has been created and your statistics are now setup!

You can now view the statistics for your domain at: xxxx.com/awstats/
 
Senad said:
A bug possibly? I have this on another server works beautifully. However I recently purchased a new server with a slightly different partition creation (intead of /home it is /usr/home).



Not so much a bug as it was designed to work specifically with DA and at the time I wrote my part, DA installed into /home.

Easy solution:
Create a symlink for /home

hard solution:
If the problem is with the piece I wrote (and I do not know if yours is no is not) then you can edit the program awstatsinstall.php.
In the constructor (look for function AWStatsInstaller()) you'll see the line:

$this->_homeDir = '/home';

Change that to whatever dir you want.

Having said that I will not guarantee that this will solve your problem. It could be more complex than I realize.

Sorry but it's been over a year now since I wrote that code. The gray matter ain't what it used to be. :)

=C=
 
symlink for /home was allready created.

I guess I will have to test the hard way. Anything in the midst of resolving this in the future?
 
Back
Top