Problem with archiving on cpanel server

I recently migrated my piwik from an apache on RHEL 4 set up to cPanel on CentOS. I’m having trouble getting the archiving cron to work properly. It works fine from the browser with the authentication token, but whenever I run it either from cron or from the command line using the “su username -c” example, it doesn’t fail, but it doesn’t archive anything either. I’ve attempted this with both the appropriate cPanel user for this website and root, with the same results. Here is what the archive log looks like using the cPanel cron job.

INFO CoreConsole[2014-05-05 20:01:01] [23041] ---------------------------
INFO CoreConsole[2014-05-05 20:01:01] [23041] INIT
INFO CoreConsole[2014-05-05 20:01:01] [23041] Piwik is installed at: http://mydomain/piwik/index.php
INFO CoreConsole[2014-05-05 20:01:01] [23041] Running Piwik 2.2.0 as Super User
INFO CoreConsole[2014-05-05 20:01:02] [23041] ---------------------------
INFO CoreConsole[2014-05-05 20:01:02] [23041] NOTES
INFO CoreConsole[2014-05-05 20:01:02] [23041] - Reports for today will be processed at most every 180 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2014-05-05 20:01:02] [23041] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2014-05-05 20:01:02] [23041] - Archiving was last executed without error 20 min 54s ago
INFO CoreConsole[2014-05-05 20:01:03] [23041] - Will process 0 websites with new visits since 20 min 53s
INFO CoreConsole[2014-05-05 16:01:03] [23041] ---------------------------
INFO CoreConsole[2014-05-05 16:01:03] [23041] START
INFO CoreConsole[2014-05-05 16:01:03] [23041] Starting Piwik reports archiving…
INFO CoreConsole[2014-05-05 16:01:03] [23041] Done archiving!
INFO CoreConsole[2014-05-05 16:01:03] [23041] ---------------------------
INFO CoreConsole[2014-05-05 16:01:03] [23041] SUMMARY
INFO CoreConsole[2014-05-05 16:01:03] [23041] Total visits for today across archived websites: 0
INFO CoreConsole[2014-05-05 16:01:03] [23041] Archived today’s reports for 0 websites
INFO CoreConsole[2014-05-05 16:01:03] [23041] Archived week/month/year for 0 websites
INFO CoreConsole[2014-05-05 16:01:03] [23041] Skipped 3 websites: no new visit since the last script execution
INFO CoreConsole[2014-05-05 16:01:03] [23041] Skipped 0 websites day archiving: existing daily reports are less than 180 seconds old
INFO CoreConsole[2014-05-05 16:01:03] [23041] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2014-05-05 16:01:03] [23041] Total API requests: 0
INFO CoreConsole[2014-05-05 16:01:03] [23041] done: 0/0, 0 vtoday, 0 wtoday, 0 wperiods, 0 req, 2 ms, no error
INFO CoreConsole[2014-05-05 16:01:03] [23041] Time elapsed: 0.002s
INFO CoreConsole[2014-05-05 16:01:03] [23041] ---------------------------
INFO CoreConsole[2014-05-05 16:01:03] [23041] SCHEDULED TASKS
INFO CoreConsole[2014-05-05 16:01:03] [23041] Starting Scheduled tasks…
INFO CoreConsole[2014-05-05 16:01:03] [23041] No task to run
INFO CoreConsole[2014-05-05 16:01:03] [23041] done
INFO CoreConsole[2014-05-05 16:01:03] [23041] ---------------------------

Here is what the archive log looks like when using the su command to run the archive script.

INFO CoreConsole[2014-05-05 19:36:23] [c8c84] INIT
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] Piwik is installed at: http://mydomain/piwik/index.php
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] Running Piwik 2.2.0 as Super User
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] ---------------------------
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] NOTES
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] - Reports for today will be processed at most every 180 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO CoreConsole[2014-05-05 19:36:23] [c8c84] - Archiving was last executed without error 4 min 20s ago
INFO CoreConsole[2014-05-05 19:36:24] [c8c84] - Will process 0 websites with new visits since 4 min 20s
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] ---------------------------
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] START
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Starting Piwik reports archiving…
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Done archiving!
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] ---------------------------
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] SUMMARY
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Total visits for today across archived websites: 0
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Archived today’s reports for 0 websites
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Archived week/month/year for 0 websites
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Skipped 3 websites: no new visit since the last script execution
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Skipped 0 websites day archiving: existing daily reports are less than 180 seconds old
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Total API requests: 0
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] done: 0/0, 0 vtoday, 0 wtoday, 0 wperiods, 0 req, 2 ms, no error
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Time elapsed: 0.002s
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] ---------------------------
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] SCHEDULED TASKS
INFO CoreConsole[2014-05-05 15:36:24] [c8c84] Starting Scheduled tasks…
INFO CoreConsole[2014-05-05 15:36:25] [c8c84] No task to run
INFO CoreConsole[2014-05-05 15:36:25] [c8c84] done

And here is what the archive log looks like when I ran it from the web browser a few minutes later. Note I replaced traffic numbers with x’s.

INFO [2014-05-05 15:40:01] [207a8] INIT
INFO [2014-05-05 15:40:01] [207a8] Piwik is installed at: http://mydomain/piwik/index.php
INFO [2014-05-05 15:40:01] [207a8] Running Piwik 2.2.0 as Super User
INFO [2014-05-05 15:40:02] [207a8] ---------------------------
INFO [2014-05-05 15:40:02] [207a8] NOTES
INFO [2014-05-05 15:40:02] [207a8] - Reports for today will be processed at most every 180 seconds. You can change this value in Piwik UI > Settings > General Settings.
INFO [2014-05-05 15:40:02] [207a8] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
INFO [2014-05-05 15:40:02] [207a8] - Archiving was last executed without error 3 min 37s ago
INFO [2014-05-05 15:40:03] [207a8] - Will process 1 websites with new visits since 3 min 36s , IDs: 1
INFO [2014-05-05 15:40:03] [207a8] ---------------------------
INFO [2014-05-05 15:40:03] [207a8] START
INFO [2014-05-05 15:40:03] [207a8] Starting Piwik reports archiving…
INFO [2014-05-05 15:40:07] [207a8] Archived website id = 1, period = day, x visits in last 2 days, x visits today, Time elapsed: 4.448s
INFO [2014-05-05 15:40:07] [207a8] Skipped website id 1 periods processing, already done 40 min 17s ago, Time elapsed: 4.449s
INFO [2014-05-05 15:40:07] [207a8] Done archiving!
INFO [2014-05-05 15:40:07] [207a8] ---------------------------
INFO [2014-05-05 15:40:07] [207a8] SUMMARY
INFO [2014-05-05 15:40:07] [207a8] Total visits for today across archived websites: x
INFO [2014-05-05 15:40:07] [207a8] Archived today’s reports for 1 websites
INFO [2014-05-05 15:40:07] [207a8] Archived week/month/year for 0 websites
INFO [2014-05-05 15:40:07] [207a8] Skipped 2 websites: no new visit since the last script execution
INFO [2014-05-05 15:40:07] [207a8] Skipped 1 websites day archiving: existing daily reports are less than 180 seconds old
INFO [2014-05-05 15:40:07] [207a8] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
INFO [2014-05-05 15:40:07] [207a8] Total API requests: 1
INFO [2014-05-05 15:40:07] [207a8] done: 1/1 100%, x vtoday, 1 wtoday, 0 wperiods, 1 req, 4452 ms, no error
INFO [2014-05-05 15:40:07] [207a8] Time elapsed: 4.452s
INFO [2014-05-05 15:40:07] [207a8] ---------------------------
INFO [2014-05-05 15:40:07] [207a8] SCHEDULED TASKS
INFO [2014-05-05 15:40:07] [207a8] Starting Scheduled tasks…
INFO [2014-05-05 15:40:08] [207a8] No task to run
INFO [2014-05-05 15:40:08] [207a8] done