Can someone please help me out with trying to set this up?

The install doc says "Edit the file config.php." The config.php says "BetterAWstats has an online config editor that you can use instead of editing this file". Which I assume leads me to the settings at {site}/admin/settings/bawstats.

The "AWstats icon directory" is filled in, and makes sense to me, since the icons were included with the module.

But if I leave the data, library, and language entries blank, I get
* AWstats data location "" is not a directory
* AWstats library location "" is not a directory
* AWstats language location "" is not a directory

Okay..... If I create the data, library, and language directories, ensure the permissions are good, and point the configuration to them, I get it accept the "sites/all/modules/bawstats/data". But for the other two?

* AWstats library directory "sites/all/modules/bawstats/library" does not contain necessary library files?
* AWstats language directory "sites/all/modules/bawstats/language" does not contain necessary language files?

So where are the library and language files? Or where can I get them from?

I've also gone through the AWstats website documentation, and much of that assumes that I'm working on a local Linux, Unix, or Windows Server web host.

Surely I'm doing something silly, yes?

Thanks, and Cheers,
//TB

Comments

anaru’s picture

Assigned: Unassigned » anaru

I think there may be some confusion between awstats, bawstats and betterawstats. AWstats is a perl based web statistics CGI that has nothing to do with Drupal, but produces good web statistics data from web server logs. Bettweawstats is a PHP engine and CGI script that uses the AWstats data and renders/displays it in more interesting ways. Bettweawstats also has nothing to do with Drupal. Bawstats is a drupal module front end to betterawstats. I should have explained this better in the docs/install.drupal.txt file.

So, the config.php is code that belongs to betterawstats, i.e. not drupal, and when it says things like "BetterAWstats has an online config editor" it does mean betterawstats not bawstats. However, all the betterawstats configuration can be done with that file (which will effect how bawstats works, as it uses betterawstats as a backend).

The "AWstats icon directory" is filled in, and makes sense to me, since the icons were included with the module.
This is not the case. As described in the install.drupal.txt file, the icons are supplied as part of the AWstats perl package (under wwwroot/icon) and this icon directory must be copied into the module space. The location you copy this to is then configured as the "AWstats icon directory".

Okay..... If I create the data, library, and language directories
You do not create these directories, again these are provided as part of a running AWstats package. You have to have AWstats running and collecting statistics before the data dir will have any data in it though. This is nothing to do with bawstats or betterawstats, this is just getting AWstats working.

AWstats library directory "sites/all/modules/bawstats/library" does not contain necessary library files?
Again, this is because you created those directories, and in fact they won't contain the necessary AWstats library or data files. Once you have a working AWstats, set the "AWstats data location", "AWstats library location" and "AWstats language location" to their locations where AWstats is installed. This is described in the docs/install.drupal.txt file

I hope that helps clear up some misunderstandings?

maynard’s picture

I'm running into trouble as well. I have a Debian host running Apache 2, mysql, Drupal-6.1, and the default awstats that ships with Debian 4. Anyway, I've got awstats configured well enough as I'm collecting data and generating status html reports manually. I've got bawstats installed and the module turned on .. but no stats. And yes, I've gone to the configuration page in drupal and specified where the awstats db files (etc) are located. No luck.

Two questions:

1) Does bawstats want the db format in plain text or xml?

2) Should I have to manually edit /modules/bawstats/config.php? (I did, it did no good)

Thanks,
--M

anaru’s picture

Status: Active » Closed (fixed)

The xml issue has been passed upstream (support for this I think it is being worked on) and the help and setup in version 6.x-1 has been much improved. I hope this helps.

edeation’s picture

Status: Closed (fixed) » Active

Anaru,
This module seems to be fine for me but I have the same problem than brewreview and for me the problem is still not fixed.
Can you simply give a tree example of a bawstats installation (regarding the four required AWstats paths)
Thank you

egfrith’s picture

Title: Some install/setup help please? » Simplify installation and instructions
Assigned: anaru » egfrith
Category: support » bug
Status: Active » Fixed

I've written a new top-level README.txt file and simplified the installation a bit by removing the index.php file. Please download the latest dev version to try it out. I'm marking this as fixed, but please reopen if things don't work or the instructions aren't clear.

egfrith’s picture

P.S. I forgot to mention: you will need to install the Libraries API module from http://www.drupal.org/project/libraries before you upgrade BAWstats to the dev version.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

seortiz’s picture

Status: Closed (fixed) » Active

Hello,

I am posting here in an attempt to offer you a view of someone who has never used statistics in a site before, but has spent quite a long time reading documentation and trying it. Hopefully this can improve the README/config.php files with an example and a bit of extra documentation :-)

I am having some trouble using this module. I found clear enough in README file that this module needs AWstats working prior to being able to see anything in Drupal.

On the other hand, I see that Drupal module is a different front-end for BetterAWstats but... do I need BetterAWstats installed to make it work? This is not clear to me.

At the moment, I have an Ubuntu server with AWstats working nicely. I can access them through my browser :-) I have also installed bawstats-1.1 module (and its "library" requirement). I have even configured the paths in the module settings... but still no luck!

Ubuntu/Debian packages split awstats on several directories, so what I have is the following:

* General site information (renamed for this post):

  • Site domain: foosite.com
  • Drupal 6.13 and bawstats-1.1
  • Drupal installed in a subdirectory, thus accessing means: foosite.com/foobardrupal/.

* Awstats is configured by Ubuntu as follows:

  • Main components (img, lang, etc.): /usr/share/awstats.
  • Configuration: /etc/awstats (-rw-r--r-- 1 root root 59K 2009-12-21 15:01 awstats.foosite.com.conf)
  • Database: /var/lib/awstats (drwxr-xr-- 2 www-data www-data 4,0K 2009-12-22 10:21 awstats)

* bawstats module configuration:

root@essp:~# ls -lh /var/www/foobardrupal/sites/all/libraries/bawstats/
total 0
lrwxrwxrwx 1 drupal drupal 24 2009-12-18 16:24 icon -> /usr/share/awstats/icon/

* Bawstats module settings in Drupal: no complaints.

* config.php (Please note that, apart from "path_lib" and "path_lang", I dont' have a clear idea about what are the expected paths / URLs):

// NAME:    Script URL
// INFO:    The url of BetterAWstats' directory, No trailing slash
// DEFAULT: 'http://awstats.local'
$BAW_CONF['site_url'] = 'http://foosite.com';

// NAME:    Script path
// INFO:    The path of BetterAWstats, No trailing slash
// DEFAULT: '/path/to/betterawstats/'
$BAW_CONF['site_path'] = '/var/www/foobardrupal/sites/all/modules/bawstats';

// NAME:    Path to AWStats Data
// INFO:    Set this value to the directory where AWStats saves its database
//          files into. ATTENTION: If you read those files on windows but have
//          them created on linux or the other way round, make sure you transfer
//          them 'BINARY'. Otherwise they cannot be read properly. No trailing
//          slash
// DEFAULT: '/path/to/betterawstats/awstats/data'
$BAW_CONF['path_data'] = '/var/lib/awstats';

// NAME:    Path to AWStats Libraries
// INFO:    Set this value to the directory where AWStats saves its library
//          files into. No trailing slash
// DEFAULT: '/path/to/betterawstats/awstats/lib'
$BAW_CONF['path_lib'] = '/usr/share/awstats/lib';

// NAME:    Path to AWStats Language files
// INFO:    Set this value to the directory where AWStats saves its language
//          files into. No trailing slash
// DEFAULT: '/path/to/betterawstats/awstats/lang'
$BAW_CONF['path_lang'] = '/usr/share/awstats/lang';

// NAME:    URL to AWStats Icons
// INFO:    The url to the awstats icons, should include the whole http://...,
//          no trailing slash.
// DEFAULT: 'http://awstats.local/awstats/icon'
$BAW_CONF['icons_url'] = 'http://foosite.com/awstats-icon';

That's it!

Thanks!

egfrith’s picture

Hello seortiz,

sorry for the delay in replying - I have been very busy. Thanks for taking the trouble to post comments on the understandability of the instructions. I'll try to incorporate your comments into the next iteration of the README and config files.

BenK’s picture

Keeping track of this thread...

izmeez’s picture

subscribing. Sorry to say but I also found the instructions difficult to follow and decided to take a step back from it after some failed attempts.

egfrith’s picture

Status: Active » Fixed

Apologies for the long delay here. I have modified the README.txt file so that

(a) There are clearer instructions about how to install AWStats in the first place, including under Debian and Ubuntu
(b) There are clearer instructions about what to set the various directories to, including under Debian and Ubuntu.

It is confusing that some configuration information appears twice, once in the config.php file and once in the Drupal database. The database information overrides the config.php information. I think this duplicated information should be stripped out of config.php; I will set up a separate task to deal with this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.