New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable php executable for archive.sh #1989
Comments
What is your php path? why is not picked up by archive.sh? |
On my hosters server there are at least two versions of php installed. At some point (I don't know why) it started to give a segmentation fault with the older version. I had to change the script to have the version 5.3 started. But with the next update of piwik I will have to change the script again, until the hoster solved the problem with the segmentation fault. So the php path is picked up by archive.sh but I would like to bypass the mechanism to set the path myself without changing archive.sh. |
OK makes sense, if you can provide a patch it's more likely we will do the change :) |
I can try... should it use a parameter for the script or a configuration file to provide the optional path? what would make sense in the piwik architecture? |
This has come up before, and I don't think it requires a change to the script, since it's environment specific. The FAQ has:
Can you add a PATH= line to your crontab, so it looks like:
|
As the hosting provider allows only to create cron jobs through a web gui I can't add the PATH= line to the crontab. But with your input I found another solution. I created a wrapper around archive.sh and called it archive-ex.sh. The cron job calls now my new script. Inside this script I set the path and call then the archive.sh script:
With this solution I don't need this feature anymore. The ticket can be closed in my oppinion. Thanks for your support! |
Ok. p.s. some environments may allow something like this one-liner:
Similarly, if your host didn't have /bin/sh:
|
(Matt: why does the FAQ example have "www-data" in it?) |
Replying to vipsoft:
there are two different types of cronab files: the system crontab, in /etc/crontab (and includes in /etc/cron.d/). that has a username field to specify the user to run the job as, and user crontabs, which don't haev it (because jobs always run as the owner of the crontab). www-data is the name of the user the webserver runs as on most distributions... and it's best to run the cronjob as the same user. the example without username is for putting directly into that user's crontab (which is also what your web interface most likely uses) |
It would be nice to have the possibility to configure the path and name of the php executable to bypass the search mechanism.
The text was updated successfully, but these errors were encountered: