Archiving Problem (no param found), 1.7.1


#1

Hi everyone,

I also have a problem running the archive script.
If I call the script directly in the working directory via


php5 archive.php --url=http://mysite.com/

everything works fine. But when I install the cronjob, and I call the script via


php5 /var/www/........./archive.php --url=http://mysite.com/

I just get the following:


(13:26:42) [~] php5 /var/www/......../archive.php --url=http://mysite.com/
X-Powered-By: PHP/5.2.13
Content-Type: text/html; charset=utf-8

[2012-02-29 12:26:59] [219da620]
[2012-02-29 12:26:59] [219da620] Usage:
[2012-02-29 12:26:59] [219da620]        /path/to/cli/php "/var/www/......./archive.php" --url=http://your-website.org/path/to/piwik/ [arguments]
[2012-02-29 12:26:59] [219da620]
[2012-02-29 12:26:59] [219da620] Arguments:
[2012-02-29 12:26:59] [219da620]        --url=[piwik-server-url]
[2012-02-29 12:26:59] [219da620]                        Mandatory argument. Must be set to the Piwik base URL.
[2012-02-29 12:26:59] [219da620]                        For example: --url=http://analytics.example.org/ or --url=https://example.org/piwik/
[2012-02-29 12:26:59] [219da620]        --force-all-websites
[2012-02-29 12:26:59] [219da620]                        If specified, the script will trigger archiving on all websites.
[2012-02-29 12:26:59] [219da620]                        This can be used along with --force-all-periods to trigger archiving on all websites and all periods.
[2012-02-29 12:26:59] [219da620]        --force-all-periods[=seconds]
[2012-02-29 12:26:59] [219da620]                        Triggers archiving on websites with some traffic in the last [seconds] seconds.
[2012-02-29 12:26:59] [219da620]                        [seconds] defaults to 604800 which is 7 days.
[2012-02-29 12:26:59] [219da620]                        For example: --force-all-periods=86400 will archive websites that had visits in the last 24 hours.
[2012-02-29 12:26:59] [219da620]        --force-timeout-for-periods=[seconds]
[2012-02-29 12:26:59] [219da620]                        The current week/ current month/ current year will be processed at most every [seconds].
[2012-02-29 12:26:59] [219da620]                        If not specified, defaults to 3600.
[2012-02-29 12:26:59] [219da620]        --accept-invalid-ssl-certificate
[2012-02-29 12:26:59] [219da620]                        It is _NOT_ recommended to use this argument. Instead, you should use a valid SSL certificate!
[2012-02-29 12:26:59] [219da620]                        It can be useful if you specified --url=https://... or if you are using Piwik with force_ssl=1
[2012-02-29 12:26:59] [219da620]        --help
[2012-02-29 12:26:59] [219da620]                        Displays usage
[2012-02-29 12:26:59] [219da620]
[2012-02-29 12:26:59] [219da620] Notes:
[2012-02-29 12:26:59] [219da620]        * It is recommended to run the script with the argument --url=[piwik-server-url] only. Other arguments are not required.
[2012-02-29 12:26:59] [219da620]        * This script should be executed every hour via crontab, or as a deamon.
[2012-02-29 12:26:59] [219da620]        * You can also run it via http:// by specifying the Super User &token_auth=XYZ as a parameter ('Web Cron'),
[2012-02-29 12:26:59] [219da620]          but it is recommended to run it via command line/CLI instead.
[2012-02-29 12:26:59] [219da620]        * If you use Piwik to track dozens/hundreds of websites, please let the team know at hello@piwik.org
[2012-02-29 12:26:59] [219da620]          it makes us happy to learn successful user stories :)
[2012-02-29 12:26:59] [219da620]        * Enjoy!
[2012-02-29 12:26:59] [219da620]

Any ideas why this happens?

Thanks!


(Matthieu Aubry) #2

Sorry I don’t know why this would happen? Maybe you need to add a parameter to your php5 script?
or try upgrade php?


#3

No, any other script works fine.
I’m using PHP 5.3.8 on this machine, but it doesn’t work.

It’s hard for me to search for a bug, because there is no error message sent by Piwik, just the script usage.


#4

Hey, no ideas? Happened after upgrading to 1.7. Direct call to archive.sh was possible without any problems.