CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • can't run cron
Pages: [1]

Author Topic: can't run cron  (Read 1871 times)

sstern

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal
  • MySQL version: 5.5.29
  • PHP version: 5.3.3
can't run cron
June 14, 2013, 03:44:50 pm
Attempts to run cron stuff from the CLI fail

$ sudo php /var/www/xxxx/wordpress/wp-content/plugins/civicrm/civicrm/bin/cli.php -u xxx -p xx - Job -a execute

DB Error: connect failed

I have verified that the id/password/dbnames in civicrm.settings.php are correct & Civi is able to import users from WordPress, so it must be able to read the WP database.  What's next?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: can't run cron
June 16, 2013, 06:57:44 am
Can you test the cron using the URL method?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sstern

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal
  • MySQL version: 5.5.29
  • PHP version: 5.3.3
Re: can't run cron
June 16, 2013, 08:17:26 am
This throws an series of error

[16-Jun-2013 10:16:50] PHP Fatal error:  Call to undefined function is_admin() in /var/www/slnmembers/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/Base.php on line 50


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: can't run cron
June 16, 2013, 08:41:19 am
A Google search for

"Call to undefined function is_admin"

with the quotes, finds thousands of results, all regarding WordPress. Maybe this is a WordPress issue...
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sstern

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.3.4
  • CMS version: Drupal
  • MySQL version: 5.5.29
  • PHP version: 5.3.3
Re: can't run cron
June 16, 2013, 09:14:38 am
I'm beginning to think that WordPress / CiviCRM is a not ready for prime time combination.  I may take this afternoon to switch it to Drupal. 

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: can't run cron
June 17, 2013, 08:55:48 am
I've gotten the cron to run on two different web hosts with WordPress: Hostgator and CiviHosting.

Who is your Host?  Is their PHP CLI the correct version?  I had to use special syntax to invoke the correct PHP CLI on Hostgator.

WPMonkey

  • I’m new here
  • *
  • Posts: 12
  • Karma: 0
  • CiviCRM version: 4.3.3
  • CMS version: WordPress 3.5.1
  • MySQL version: 5.5.31
  • PHP version: 5.2.17
Re: can't run cron
September 07, 2013, 08:44:17 am
aglozier Would you mind posting the syntax you used, and what is the correct and incorrect version of the PHP CLI client?

Thanks!

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: can't run cron
September 09, 2013, 06:43:54 am
Here's my notes on the subject:

Upgrading to CiviCRM 4.2 required upgrading to PHP 5.3.  With HostGator this is done as described here: http://support.hostgator.com/articles/hosting-guide/hardware-software/php-5-3.

However this broke the CiviCRM cron job.  Using PHP 5.3 for CLI or a cron requires special syntax described here: http://www.velvetblues.com/web-development-blog/cron-jobs-ssh-php-53-hostgator-shared-hosting/.

We are no longer using HostGator.  We switched to CiviHosting.com and have no issues with the PHP version.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • can't run cron

This forum was archived on 2017-11-26.