Forum Moderators: bakedjake

Message Too Old, No Replies

cron for awstats

         

RammsteinNicCage

6:29 pm on May 22, 2004 (gmt 0)

10+ Year Member



I've been searching all over, trying to figure out how to get this to work and I can't. What I want to do is have awstats automatically update every hour (2 hours would probably be better for the server...).

This is what I currently have in my control panel's advanced (unix style) crontab thingy:

There are 5 boxes, the first one (minute) has 0, the rest have *.

/home/myusername/public_html/cgi-bin/awstats.pl -config=www.mysite.com -update > /home/myusername/public_html/awstats.txt

The text file is generated, but the stats don't appear to be updated. What am I doing wrong?

Jennifer

RammsteinNicCage

3:09 pm on May 24, 2004 (gmt 0)

10+ Year Member



Anyone?

Jennifer

bakedjake

4:33 pm on May 24, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi Jennifer - did you try running the command from the command line to see if it outputs any errors? And did you check the contents of the text file?

The syntax for awstats 6 update is:

awstats.pl --config=www.domain.com

if the config file is called "awstats.www.domain.com.conf".

RammsteinNicCage

6:04 pm on May 24, 2004 (gmt 0)

10+ Year Member



My config file is only called awstats.conf. When I press update on the stats page from the browser, it does update....

The txt file however does say this when the cron is run:

Error: awstats failed to create directory DirData (DirData="../awstats-archives", CreateDirDataIfNotExists=1).
Setup ('/home/[i]username[/]/public_html/cgi-bin/awstats.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Should I change the config file to awstats.www.domain.com.conf?

And what do you mean by the command line? I don't know if this matters, but I am doing this on a shared server environment, not on my computer....

Thanks for the help!

Jennifer

bakedjake

3:46 pm on May 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



No, it sounds like you have a permissions. It looks like awstats is trying to create a directory in your cgi-bin folder, but the webserver user doesn't have permission to do it.

Create the directory it is asking for. Then, you may have to either make it world-writable or owned by the webserver user - check the awstats docs for details.

RammsteinNicCage

9:38 pm on May 25, 2004 (gmt 0)

10+ Year Member



Renaming the file to awstats.www.domain.com.conf did the trick, thanks!

Jennifer