How to run archive.sh in DirectAdmin?


#1

Hi.

I disabled “Allow Piwik archiving to trigger when reports are viewed from the browser”. I entered “3600 seconds” in “Reports for today will be processed at most every”. Next I made a cron job in my DirectAdmin:

“0 * * * * /home/stoow/domains/example.com/public_html/stats/misc/cron/archive.sh”

Stats for today are not changing. I still see 0 user etc. What do I wrong?

I apologize for my English, but I hope you will understand what I mean.


#2

Hello,
I have the same problem with “Allow Piwik archiving to trigger when reports are viewed from the browser” enabled.

I cannot have any stats. The “log_visit” table is empty.


#3

Admin of my server said that Cron returns this message:

"“php binary not found. Make sure php5 or php exists in PATH.”

Of course php exists, its path: /usr/local/bin/php

I hope it will help to diagnose the problem.


(vipsoft) #4

It’s probably not in your cron user’s PATH.

If you can’t edit your crontab, I suggest you use a wrapper script that adds /usr/local/bin to your PATH, e.g.,


PATH=/usr/local/bin:$PATH


#5

Hi,

Im using windows server 2003 and i also receive “php binary not found. Make sure php5 or php exists in PATH.”,but when i edit the archive.windows.ps1 in $BINS = @(“php5.exe”, “php.exe”)

works fine to me now…

i hope this help for some


#6

Thank you very much! It really works :slight_smile: I’ve add complete path to lines in archive.windows.ps1 and archive.sh (just to be sure) and it works. Thanks again :slight_smile:


(Matthieu Aubry) #7

The problem is that the file will be overwritten next time you upgrade Piwik.

we need to find a better solution, can you please edit the script to allow passing the path as a parameter as well ? if you can please submit a patch here so we can make sure the script will work when you upgrade,

then you can update the scheduled task to pass your custom PHP path as a parameter