Cron Error after 1.9.2 install.. HELP!

Hi, I recently uninstalled and then reinstalled piwik to the latest version. Every hour I have been getting an email from my cron daemon stating the following :

ERROR: During Piwik init, Message: The mysql driver is not currently installed

I have previously has piwik successfully installed and this issue never occured.

Do I need to delete all piwik stuff from my site and then re-install AGAIN?

Somebody please help…

EXTRA INFO FROM EMAIL HEADER :

/usr/local/cpanel/3rdparty/bin/php /home/mysite/public_html/piwik/misc/cron/archive.php

Enable mysql driver extension in your CLI php.ini or ask your webhost

I have SQL enabled, I use it for other things. I’ve tried reinstalling piwik again and the error seems to continue occurring. Would you happen to have any other fixes for this issue?

Thanks!

Hi,

Any news about this? I have the same error on a brand new install. phpinfo shows:

PDO
PDO support enabled
PDO drivers sqlite, mysql, sqlite2

I have asked my webhost, they suggest asking here :wink:

TIA,
Moose.

What errors? please post screenshot.

Also try a <?php phpinfo(); ?>
in a new file

Then in the output do you really see the mysql driver installed or whatever piwik requires?

Hi,

The Email I get from CRON has subject:
Cron <…@…> /usr/local/cpanel/3rdparty/bin/php /home/…/public_html/bongo/analytic/misc/cron/archive.php – url=http://bongoit.co.uk/analytic/

and Body:
ERROR: During Piwik init, Message: The mysql driver is not currently installed

The phpinfo is at http://bongoit.co.uk/analytic/php_info.php

According to /config/global.ini.php the adapter is set to PDO_MYSQL and phpinfo linked above shows

PDO
PDO support enabled
PDO drivers sqlite, mysql, sqlite2

pdo_mysql
PDO Driver for MySQL enabled
Client API version 5.1.63

Thanks,
Justin.

try run the script first in command line, does it work ?

Hi there,

Run via the browser I get:

[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] NOTE: if you execute this script at least once per hour (or more often) in a crontab, you may disable ‘Browser trigger archiving’ in Piwik UI > Settings > General Settings.
[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] see doc at: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo
[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] ---------------------------
[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] INIT
[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] Querying Piwik API at: Sign in - Piwik
[2013-01-14 17:41:12] [dd28ea27] [9.75 Mb] Running as Super User: admin
[2013-01-14 17:41:12] [dd28ea27] [9.90 Mb] Notes
[2013-01-14 17:41:12] [dd28ea27] [9.90 Mb] - Reports for today will be processed at most every 10 seconds. You can change this value in Piwik UI > Settings > General Settings.
[2013-01-14 17:41:12] [dd28ea27] [9.90 Mb] - Reports for the current week/month/year will be refreshed at most every 3600 seconds.
[2013-01-14 17:41:12] [dd28ea27] [9.95 Mb] --force-all-periods was detected: we will process websites with visits in the last 7 days 0 hours
[2013-01-14 17:41:12] [dd28ea27] [10.10 Mb] Will process 2 websites with new visits since 7 days 0 hours , IDs: 2, 3
[2013-01-14 17:41:12] [dd28ea27] [10.10 Mb] ---------------------------
[2013-01-14 17:41:12] [dd28ea27] [10.10 Mb] START
[2013-01-14 17:41:12] [dd28ea27] [10.10 Mb] Starting Piwik reports archiving…
[2013-01-14 17:41:12] [dd28ea27] [10.12 Mb] Archived website id = 2, period = day, Time elapsed: 0.274s
[2013-01-14 17:41:13] [dd28ea27] [10.14 Mb] Archived website id = 2, period = week, 201 visits, Time elapsed: 0.895s
[2013-01-14 17:41:14] [dd28ea27] [10.14 Mb] Archived website id = 2, period = month, 201 visits, Time elapsed: 0.911s
[2013-01-14 17:41:15] [dd28ea27] [10.13 Mb] Archived website id = 2, period = year, 201 visits, Time elapsed: 0.370s
[2013-01-14 17:41:15] [dd28ea27] [10.12 Mb] Archived website id = 2, today = 4 visits, 4 API requests, Time elapsed: 2.451s [1/2 done]
[2013-01-14 17:41:15] [dd28ea27] [10.12 Mb] Archived website id = 3, period = day, Time elapsed: 0.552s
[2013-01-14 17:41:16] [dd28ea27] [10.14 Mb] Archived website id = 3, period = week, 21 visits, Time elapsed: 0.643s
[2013-01-14 17:41:17] [dd28ea27] [10.14 Mb] Archived website id = 3, period = month, 21 visits, Time elapsed: 0.687s
[2013-01-14 17:41:17] [dd28ea27] [10.13 Mb] Archived website id = 3, period = year, 21 visits, Time elapsed: 0.340s
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Archived website id = 3, today = 0 visits, 4 API requests, Time elapsed: 2.223s [2/2 done]
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Done archiving!
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] ---------------------------
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] SUMMARY
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Total daily visits archived: 4
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Archived today’s reports for 2 websites
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Archived week/month/year for 2 websites.
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Skipped 0 websites: no new visit since the last script execution
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Skipped 0 websites day archiving: existing daily reports are less than 10 seconds old
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Skipped 0 websites week/month/year archiving: existing periods reports are less than 3600 seconds old
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Total API requests: 8
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] done: 2/2 100%, 4 v, 2 wtoday, 2 wperiods, 8 req, 4675 ms, no error
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Time elapsed: 4.675s
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] ---------------------------
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] SCHEDULED TASKS
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] Starting Scheduled tasks…
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] No task to run
[2013-01-14 17:41:17] [dd28ea27] [10.12 Mb] done

I have no command line access (cpanel only) but I can get my hosting support to run it command line if needs be?

Thank you for your help,
justin

Ask your webhost, your cron is not setup correctly but it is not a piwik issue

For some reason, I had set up the Cron the same as the Original Poster, with php at /usr/local/cpanel/3rdparty/bin/php. As explained in the manual here: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo php is at /usr/local/bin/php

Thanks,
Justin.