5

Upgraded from 4.6.11 to 4.7.1 and now this this error when running /wp-content/plugins/civicrm/civicrm/bin/cron.php

Fatal error: Uncaught exception 'Exception' with message 'Function "is_admin()" is missing, even though WordPress is the user framework.' in /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php:261 Stack trace: #0 /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(219): CRM_Utils_System_Base->theme('PEAR_Error('DB Error: insuf...', -26, 16, Array, ' [nativecode=10...') #5 /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-26, 16, Array, ' [nativec in /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 261

3
  • How are you running this? Utilizing the run manually page, I'm able to run the jobs without issue. However, curl and wget are failing with username/password errors and/or key errors, while php is complaining of deprecated # comment marks, that need to be re-written to ;.
    – G H
    Feb 4, 2016 at 17:08
  • I got this same error in Joomla 3.4.8. Upon clearing caches and reset paths, now completely broken. Blank pages.
    – BruceW
    Feb 5, 2016 at 2:21
  • Running a script with this command: /usr/local/bin/php /home/xxxx/public_html/wp-content/plugins/civicrm/civicrm/bin/cli.php -u mysqluser -p mysqlpass -e Job -a execute i think the primary error is "DB Error: Insufficient Permissions" - however, i can log into MySql with the same credentials manually without any problem. Mar 20, 2016 at 23:03

3 Answers 3

1

On a WordPress site with CiviCRM 4.6.10 I had the same problem but switching from the "URL" to the "CLI" method of executing cron fixed the problem.

1

An issue has been filed for this in the CiviCRM bug tracker.

See https://issues.civicrm.org/jira/browse/CRM-18514

0

I see from the above that you are using the php cli method. The credentials that it is looking for is a CMS User (WordPress) with sufficient permissions in CiviCRM to run the jobs.

I just tested on 4.7.8 CiviCRM with WP 4.5.2 with the following syntax

/usr/local/php56/bin/php /home/user/htdocs/civicrm/wp-content/plugins/civicrm/civicrm/bin/cli.php -u cronuser -p somepassword -e Job -a execute

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.