I was trying to run the archive scripts. First I tried the archive.sh script, but noticed that whilst it didn’t complain about anything, it didn’t really seem to do anything either… Inspecting it a little closer, I noticed it wasn’t able to pick up values correctly, for example:
CMD_TOKEN_AUTH="$PHP_BIN -q $PIWIK_PATH -- module=API&method=UsersManager.getTokenAuth&userLogin=$PIWIK_SUPERUSER&md5Password=$PIWIK_SUPERUSER_MD5_PASSWORD&format=php&serialize=0"
TOKEN_AUTH=`$CMD_TOKEN_AUTH`
echo $TOKEN_AUTH # this outputs nothing, even though all parameters (e.g. md5 are correct)
#TOKEN_AUTH was empty…
I then tried to run the archive php on my browser using:
I am using a self-signed certificate for piwik, and have set my browser to always trust it. This way, I still get SSL protection without having to pay for the certificate. My browser is quite happy with this, and I can also instruct CURL to ignore any certificates with the -k switch, but the archive.php script seems to fail…
Any suggestions on how to resolve this (without having to buy an official certifcate)? Is there a way to tell piwik to trust my certificate, or ignore certificate errors? Or some different way to run the php script from the command line?
I have tried running both the archive.sh with this parameter, and the archive.php, but neither seem to work for me. The php returns nothing (very quickly), and the archive.sh returns this (also very quickly):
I don’t see a reason why I would need to buy a certificate. Only two people use piwik currently to view the reports, and both have the certificate installed on their browser. That’s just as secure as using a publicly-signed certificate. Other than that, all updates via the javascript go via http anyway and don’t require SSL.
Can you give me the exact command I should run?? Perhaps I’m not running it correctly.
and also various combinations where the accept-invalid-ssl-certificate comes after the url, with or without -- etc… All seems to just return with no errors or any positive or negative indication…
I’d love to know what’s the correct command to run if possible. Thanks again Matt!
and also in a couple of places in archive.php - and now I can at least run this from the browser.
Perhaps there should be a config option to disable SSL verification, and then this statement can be conditional in those (and maybe other) contexts where curl is used?