Using this 'archive.php' script is no longer recommended


#1

I’m setting up archive.php to run as a cron job, and when I checked the code of archive.php I saw this:


Using this ‘archive.php’ script is no longer recommended.
Please use ‘/path/to/php $piwikHome/console core:archive " . implode(’ ‘, array_slice($_SERVER[‘argv’], 1)) . "’ instead.
To get help use ‘/path/to/php $piwikHome/console core:archive --help’

The script is from 2.2.0.

What’s the deal here and is the recomended line PHP code that could be run like archive.php script?

I ask this because all the help is still pointing to archive.php script, no mention of some new better way of doing it.

Thanks


#2

Hi again,

I see that the help section has been updated with the new way of doing it via CP. I just implemented it and got 500 error. Here is what it said:

ERROR: Got invalid response from API request: http://example.com/web-an/index.php?module=API&method=API.get&idSite=1&period=week&date=last260&format=php&token_auth=xxxxxxxxxxxxxxxx&trigger=archivephp. Response was ’

500 Internal Server Error ... and so on for the standard 500 response page.

Simple question: I see the trigger variable that states “archivephp” and wonder if it should be archive.php?

Also, is this still calling the archive.php script that we would use anyway in the old way?

Thanks


(Matthieu Aubry) #3

When you get a 500 error, please check your server error log files, for the related error message, that should help find the bug