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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron/CLI trouble after updates to 4.2.8 (drupal 6.28, php 5.3.19)
Pages: [1]

Author Topic: Cron/CLI trouble after updates to 4.2.8 (drupal 6.28, php 5.3.19)  (Read 2667 times)

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Cron/CLI trouble after updates to 4.2.8 (drupal 6.28, php 5.3.19)
April 07, 2013, 11:55:18 am
Since upgrading civicrm to 4.2.8 and drupal to 6.28 my cron job (scheduled through cpanel) has failed.

The command used was
cd /home/mypath/public_html; php sites/all/modules/civicrm/bin/cli.php -u myuser -p mypass -e Job -a execute

and this gives
Fatal error:  cli.php can only be run from command line. in /home/mypath/public_html/sites/all/modules/civicrm/bin/cli.class.php on line 82

(I cannot use cron.php either, this fails with Unable to locate bootstrap.inc as reported in this previous thread
http://forum.civicrm.org/index.php/topic,26579.0.html )

The cron jobs with cli were working perfectly until I made the updates from civi 4.1.6 to 4.2.8 and drupal 6.26 to 6.28. 

I wondered if anyone else had found a workaround?

Thanks for your help.

nsjski

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.28
  • MySQL version: 5.6.17
  • PHP version: 5.5.13
Re: Cron/CLI trouble after updates to 4.2.8 (drupal 6.28, php 5.3.19)
April 09, 2013, 12:21:19 pm
I copied my php.ini into sites/all/modules/civicrm/bin.  Then this worked:

wget -O - -t 1 "http://mysite/sites/all/modules/civicrm/bin/cron.php?name=myuser&pass=mypass&key=mykey"

Wget was giving out of memory errors previously because (I guess) it was using /usr/lib/php.ini which specifies less memory than my own php.ini.

Civicrm/bin/cron.php will now also run in the browser - previously it could not find bootstrap.inc.

When run as a cron job using php it still cannot find bootstrap.inc
cd public_html/sites/all/modules/civicrm; php -c bin/php.ini bin/cron.php name=myname pass=mypass key=mykey

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Cron/CLI trouble after updates to 4.2.8 (drupal 6.28, php 5.3.19)

This forum was archived on 2017-11-26.