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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
Pages: [1]

Author Topic: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)  (Read 1517 times)

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 17, 2013, 01:54:01 pm
This is driving me bonkers. I'm using the cli.php script. It's getting to this line 226 of cli.class.php and disappearing (i.e. exiting, no error on screen or in any log).
Code: [Select]
if(!CRM_Utils_System::authenticateScript(TRUE, $this->_user, $this->_password, TRUE, FALSE, FALSE)) {
The _user and _password look good at this point, and I'm able to login with them. I even gave them every permission, though it doesn't look like this should even matter yet.

Can any one think of why this authenticateScript would be behaving so badly? Maybe thowing up because of something like an unescaped character in a password?

If no one has a clue, I'll keep digging.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 18, 2013, 01:46:41 pm
the authenticateScript function looks well behaved, and that first argument set to TRUE means it should be failing with a message.

i think it must have something to do with session management ...

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 21, 2013, 08:15:22 am
Wow, I can't believe no one else has experienced this. Here's what I've found after a lot of digging.
So, it's not a session problem.

Here's where I think the problem is:

 if (!CRM_Utils_System::loadBootstrap(array(), FALSE, FALSE, $civicrm_root)) {
      $this->_log(ts("Failed to bootstrap CMS"));
      return FALSE;
    }

in combination with a previous
$civicrm_root = dirname(__DIR__);


adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 21, 2013, 08:42:02 am
Wow, I'm giving up on trying to debug this. There's some nasty complexity that I think is way overdue for some code debt retirement, but in the meantime, I'll note that the drush method works, so presumably that's now the preferred method.

For the record, the place where it seemed to go awry was the civicrm_root setting, in the cli.class.php file, which looks a lot like wishful thinking. Using drush means that it can figure out how to get cmdRootPath() without some parsing of paths and crossing of fingers.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 21, 2013, 08:58:28 am
Aargh, scratch that - running it as a drush has just trashed my site, it seems to have changed some config file somewhere.

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 21, 2013, 09:26:51 am
Site is back up (seems to have been an opcode caching weirdness) but I'm getting this output when running the scheduled jobs using the drush method, and nothing seems to happen.
Code: [Select]
Array
(
    [is_error] => 0
    [version] => 3
    [count] => 1
    [values] => 1
)

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 22, 2013, 03:09:39 am
I checked this morning and it seems to be working, in spite of that output.

Conclusion: the drush method worked.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 22, 2013, 08:46:43 am
I think the part of the output that is relevant is the 'is_error' => 0
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 30, 2013, 10:06:05 am
Well, if you mean that the output is benign, then yes. But it does look rather like someone left some debugging data in somewhere (possibly me ...).


Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)
October 30, 2013, 12:35:35 pm
Those 4 params are std api output (normally there is a 'values' array too) but they are added by the api wrapper
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • cron failing silently during authentication after upgrade to 4.3.7 from 4.2 (D7)

This forum was archived on 2017-11-26.