Current User: Guest Login Register
Please consider registering


Register? | Lost Your Password?

Search Forums:


 






Minimum search word length is 3 characters – Maximum search word length is 84 characters
Wildcard Usage:
*  matches any number of characters    %  matches exactly one character

awstats and a cron problem

Reply to Post Add a New Topic
UserPost

2:03 pm
November 9, 2010


nana

Guest

hi,

I can not get my awstats updated with cron. Can Someone help me with syntax?

 

I have added to cron task

/path_from_root/awstats.pl -config=mysetup -update >/dev/null 2>&1

 

and I can see from cron log file:

(/var/www/cgi-bin/awstats.pl -config=mysetup -update >/dev/null 2>&1)

 

has been tried to be executed, but however my statistics does not update. What is wrong?

2:16 pm
November 9, 2010


Jean-Luc

Admin

posts 1063

Hello,

What happens when you run the same command from the command line ?

in the cron, you can also try

/path_from_root/awstats.pl -config=mysetup -update > /path_to/update_message.txt

This should generate a message in update_message.txt when the cron is executed.

2:26 pm
November 9, 2010


nana

Guest

I get a message:

Error: AWStats database directory defined in config file by 'DirData' parameter (../stats) does not exist or is not writable.

However, This file exists and I can update awstats manually from browser.

So, what can be wrong?

2:49 pm
November 9, 2010


Jean-Luc

Admin

posts 1063

../stats does not have the same meaning from the browser and from the command line. Use the absolute path rather than a relative path and the problem will be solved.

3:03 pm
November 9, 2010


nana

Guest

Now I can not open awstats with my browser, I get an error message in browser:

 

Error: AWStats database directory defined in config file by 'DirData' parameter (var/www/stats) does not exist or is not writable

 

And for text file:

Error: Couldn't open config file "awstats.mysetup.conf" nor "awstats.conf" after searching in path "/var/www/cgi-bin,/etc/awstats,/usr/local/etc/awstats,/etc,/etc/opt/awstats": No such file or directory

Surprised

3:39 pm
November 9, 2010


Jean-Luc

Admin

posts 1063

This does not make sense. If AWStats cannot open the config file, it cannot read the DirData parameter and complain that DirData is not writable. I suggest that you delete the update_message.txt file and try again.

var/www/stats is a relative path; /var/www/stats would be an absolute path.

Does this help ?

4:00 pm
November 9, 2010


nana

Guest

Now, I can view awstats with my browser and update it with my browser. I forgot the first / in a file path.

 

But with command line, the situation is same. Iget in a text file message:

Error: Couldn't open config file "awstats.mysetup.conf" nor "awstats.conf" after searching in path "/var/www/cgi-bin,/etc/awstats,/usr/local/etc/awstats,/etc,/etc/opt/awstats": No such file or directory

 

I am very sure that this awstats.mysetup.conf do exists in /var/www/cgi-bin directory.

 

Any further ideas?

4:52 pm
November 9, 2010


Jean-Luc

Admin

posts 1063

Weird. It could be a permission issue. Is the config file readable by everybody ?

7:04 am
November 10, 2010


nana

Guest

Ha haa. I found the mistake. For some reason my command line added some space characters for the parameters because it was too long for one line. So now it works.

 

Thank you very much for your replies!

 

Another question:

There is following line in mysetups:  AllowToUpdateStatsFromBrowser=1. If I set it to 0, does it disable the possibility update the statistic from a browser?

7:21 am
November 10, 2010


Jean-Luc

Admin

posts 1063

Good to hear the problem is solved.

You wrote:

If I set it to 0, does it disable the possibility update the statistic from a browser?

That's correct.

Reply to Post

Reply to Topic:
awstats and a cron problem

Guest Name (Required):

Guest Email (Required):

NOTE: New Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
3 + 8
   


About the InternetOfficer.com Forum

Forum Timezone: UTC 1

Most Users Ever Online: 201

Currently Online:
13 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 2
Forums: 9
Topics: 513
Posts: 2447

Membership:

There are 4127 Members
There have been 254 Guests

There is 1 Admin
There is 1 Moderator

Top Posters:

cssfsu – 55
albert_newton – 30
deepakgupta – 28
cosminpana – 20
DTNMike – 19
ahtshun83 – 17

Recent New Members: eniko, leptserkhan, JohnnyB, dweb3d, buck, newtoawstat

Administrators: Jean-Luc (1063 Posts)

Moderators: Jean-Luc (1063 Posts)