[RESOLVED] piwik cronjob

apps

#1

hi all,

i’ve just installed through one-click the piwik package and i’ve found the cronjob automatically configured for the archive function, but it does not work as i’ve enabled the email report and this is the result

Cron apedic@maputo sh -c $'sh /home/apedic/netsystemsa.it/piwik/misc/cron/archive.sh

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

I’ve contacted the support and they have told me to insert the full Php path in the command, but I don’t understand how to add it as the script is a shell script and not a Php script.
Moreover, as this cronjob is automatically configured by one-click, I think it should works “out of the box” without any modification.

Could anyone help me to configure this script?

thanks


#2

Yep, I’d expect to work as installed. But…somewhere in that archive.sh is a PHP command or two.
You’ll need to edit archive.sh and find instances where it calls the ‘php’ command and replace it with a full path command of ‘/usr/local/php5/bin/php’

If you have FTP enabled, you can use WebFTP to edit the file. Manage Domains -> Click WebFTP for that domain.


#3

[quote=“sdayman, post:2, topic:53121”]
Yep, I’d expect to work as installed. But…somewhere in that archive.sh is a PHP command or two.
You’ll need to edit archive.sh and find instances where it calls the ‘php’ command and replace it with a full path command of ‘/usr/local/php5/bin/php’

If you have FTP enabled, you can use WebFTP to edit the file. Manage Domains -> Click WebFTP for that domain.
[/quote][hr]
thanks, can you tell me how to force cron to execute so i can test it without waiting 1 hour?[hr][hr]

i’ve got it working replacing all occurrences of $PHP_BIN with /usr/local/php5/bin/php.

thanks sdayman


#4

Either change the frequency of your cron job, like every 10 minutes (via Custom setting) just for testing or wait it out. If you set it to every 10 minutes, please remember to set it back to hourly.