This script archive.php must only be executed only in command line CLI mode.
In a shell, execute for example the following to trigger archiving on the local Piwik server available at 'localhost/piwik'
$ /path/to/php /path/to/piwik/misc/cron/archive.php localhost/piwik