I’m calling the archive.sh via cronjob.
Since my upgrade from 0.6 RC 1 to 0.6.1 it doesn’t work anymore.
The problem is this call:
$PIWIK_PATH – module=API&method=SitesManager.getAllSitesId&token_auth=$TOKEN_AUTH&format=csv&convertToUnicode=0
It returns an empty csv. (tested it in my browser with correct token id).
I have only one site defined (id=1). I’ve updated piwik by deleting all old files and uploading all
new files via FTP. Everything else (Dashboard, archiving via browser etc.) works fine.
what is the content of your config/config.ini.php ?
it looks like the magic sed command is failing to retrieve the md5 password from your config file, probably because it uses some uncommon characters? you can send it by MP if you don’t want to reveal passwords etc.
[quote=matthieu @ May 24 2010, 06:20 AM]what is the content of your config/config.ini.php ?
it looks like the magic sed command is failing to retrieve the md5 password from your config file, probably because it uses some uncommon characters? you can send it by MP if you don’t want to reveal passwords etc.[/quote]
I’m calling the archive.sh via cronjob.
Since my upgrade from 0.6 RC 1 to 0.6.1 it doesn’t work anymore.
The problem is this call:
$PIWIK_PATH – module=API&method=SitesManager.getAllSitesId&token_auth=$TOKEN_AUTH&format=csv&convertToUnicode=0
It returns an empty csv. (tested it in my browser with correct token id).
I have only one site defined (id=1). I’ve updated piwik by deleting all old files and uploading all
new files via FTP. Everything else (Dashboard, archiving via browser etc.) works fine.
Anyone with the same issue or an idea?[/quote]
I’ve done a little more work on this, and I think I might be on to something.
I inserted the command echo $TOKEN_AUTH into archive.sh just after TOKEN_AUTH=$CMD_TOKEN_AUTH and the result that I’m seeing is this:
I believe that $CMD_TOKEN_AUTH needs to be parsed more to get the actual token_auth code rather than the full returned headers from the command. Thoughts?
That’s because the “php” that you’re executing from the command line is the PHP-CGI binary, and not the PHP-CLI binary; the latter doesn’t output HTTP headers.