| User | Post |
|
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

|
|
|
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.
|
|