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 »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • civimail cron failing on member sync
Pages: [1]

Author Topic: civimail cron failing on member sync  (Read 928 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
civimail cron failing on member sync
March 02, 2011, 08:04:45 pm
We have a site where the civimail.cron is failing on drupal member roles - it is trying to sync the civimail user I guess but for some reason global root is not known & so it can't do all it's requiring.

The following patch works but assume there is a better way


Code: [Select]
Index: drupal/modules/civicrm_member_roles/civicrm_member_roles.module
===================================================================
--- drupal/modules/civicrm_member_roles/civicrm_member_roles.module (revision 32697)
+++ drupal/modules/civicrm_member_roles/civicrm_member_roles.module (working copy)
@@ -420,6 +420,9 @@
     } 
     //Bring in CRM_Core_BAO_UFMatch class so we can find Drupal UIDs
     global $civicrm_root;
+   if (empty($civicrm_root)){
+     return FALSE;
+   }
     require_once $civicrm_root . '/CRM/Core/BAO/UFMatch.php';
     $rules = db_query('SELECT * FROM {civicrm_member_roles_rules}');
     //Error check




site is 3.3.5 - I'm also experiencing the odd situation where the site the unhacked cron tries to run the cli part of the script & thinks the things passed in the URL are args. But, then it can't find bin/cli.php

if (isset($argv)) {
  require_once ("bin/cli.php");
  $cli=new civicrm_cli ();
  //if it doesn't die, it's authenticated
  require_once 'CRM/Core/Config.php';
  $config =& CRM_Core_Config::singleton();
  processQueue( $config->mailerJobSize);
} else  { //from the webserver
  run( );
}
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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: civimail cron failing on member sync
March 02, 2011, 11:36:00 pm
Hmm I'm wondering if this is PHP config

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13684

I'm not that strong on PHP vs PHP w CGI but it seems likely to be the cause. I stuck some watchdogs in the script & it appeared that when users access the cron the first time they go through the code below $initialize = "".

But when the script is run under civimail it seems to be 1 even the first time through.

function civicrm_initialize( )

    static $initialized    = false;
    static $failure        = false;

    if ( $failure ) {
        return false;
    }

    if ( ! $initialized ) {




Code: [Select]
PHP Version 5.2.17

System Linux s483.sureserver.com 2.6.36.2-grsec #1 SMP Thu Jan 6 08:49:12 EST 2011 x86_64
Build Date Jan 27 2011 06:39:07
Configure Command './configure' '--enable-discard-path' '--with-gettext' '--enable-exif' '--enable-bcmath' '--enable-calendar' '--enable-magic-quotes' '--with-curl' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-zlib' '--with-t1lib' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/usr' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-mhash' '--with-mcrypt' '--with-openssl' '--with-mysql=/usr/local/mysql5' '--with-ldap' '--enable-mbstring' '--enable-inline-optimization' '--with-iconv' '--enable-pcntl' '--with-pspell' '--with-bz2' '--enable-sockets' '--prefix=/usr/local/php5' '--with-xsl' '--with-config-file-path=.:/etc' '--enable-soap' '--with-tidy' '--with-mysqli' '--enable-zip' '--with-pdo-mysql=/usr/local/mysql5' '--enable-fastcgi'
Server API CGI/FastCGI
Virtual Directory Support disabled
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 »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • civimail cron failing on member sync

This forum was archived on 2017-11-26.