Archive.sh failure

hello,

i tried to get the auto archive function running but dont really know what i am doing wrong.
i tried to run the script on the console to see if it is working but it gives me the following failur message:

piwik/misc/cron/archive.sh: which: not found
piwik/misc/cron/archive.sh: which: not found
piwik/misc/cron/archive.sh: which: not found
piwik/misc/cron/archive.sh: which: not found
piwik/misc/cron/archive.sh: test: argument expected

i am not familiar with shell scripting and dont know what the failure message means.
anyone who can “translate” it please? what could i do to get it to work as it should?

Sorry, but your system doesn’t have some very basic shell commands like “which” and “test”. Can you contact your hosting provider? Maybe you have to add something to your PATH.

Thanks for the Reply. Well I contacted my hosting provider and I have to say they were no help at all.

Well i figured out the Path to PHP is /bin/php or /bin/php5

Now i got it so far that if i Enter

sh /piwik/misc/cron/archive.sh

it says

/piwik/misc/cron/archive.sh: /piwik/misc/cron/archive.sh: cannot open

well, no longer the mentioned failure but another one. :wink:

cannot open doesnt mean that it isnt executable isnt it?

I’m not sure but maybe is a permission problem, check if it has the correct ones. like 755.
If it has the correct ones, will be other problem.

well i gave it 777 alreade but nothing changes :frowning:

can i modify the start of the script by setting the path to php as a variable?

Sure, feel free to edit as needed. You should also copy the script to another directory (or rename it), so that it doesn’t get overwritten by a Piwik update.

Hmmm. I meant if there is any possibility to start the script with some variables like

archive.sh -path to php etc.???

i am not used to sh scripts or programming. :frowning: