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) »
  • CRON not working since v4.5 install.
Pages: [1]

Author Topic: CRON not working since v4.5 install.  (Read 501 times)

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
CRON not working since v4.5 install.
October 08, 2014, 06:34:20 pm
I didn't notice until today, that after I installed v4.5, the Scheduled Jobs via CRON stopped working.    In fact the last time it ran, was just before I installed 4.5.  So something that worked, is not working now.

Has anyone else seen this?   I just spent four hours trying to get the CRON to work, whether a direct call to the script, wget, cUrl ... you name it, I tried it.

I added debug lines to the cli.php script, and no matter how its called, it dies after step 1 as shown here:

Code: [Select]
echo('start of job');

require_once ('cli.class.php');
echo('step1');

$cli = new civicrm_Cli();

echo('step2');

$cli->initialize() || die( 'Died during initialization' );

echo('initialized');

$cli->callApi() || die( 'Died during callApi' );

echo('end of job');


I can't find where (or if) the ... died during ... text is written, as its sure not showing up in the output.

Thanks for any assistance.


Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: CRON not working since v4.5 install.
October 09, 2014, 07:38:58 am
Anything in the php logs that might help?
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: CRON not working since v4.5 install.
October 09, 2014, 08:04:09 am
Quote from: Michael McAndrew on October 09, 2014, 07:38:58 am
Anything in the php logs that might help?

I didn't see anything, but let me turn on full logging to see if that helps.   

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: CRON not working since v4.5 install.
October 24, 2014, 11:46:21 am
Sorry I haven't been able to get back to this for most of the month - other priorities, then some R&R time.

Finally found the issue in the PHP logs, turns out the fault is in the /administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php file at line 541.    Here's the code in question:

Code: [Select]

        //include additional files required by Joomla 3.2.1+
        if ( version_compare(JVERSION, '3.2.1', 'ge') ) {
            require $joomlaBase . '/libraries/cms/application/helper.php';
           require $joomlaBase . '/libraries/cms/application/cms.php';
           require $joomlaBase . '/libraries/cms/application/administrator.php';
        }
      }


Here's the PHP error log entries:
Code: [Select]
PHP Fatal error:  require(): Cannot redeclare class japplicationhelper in /home/nwtaadmin/public_html/administrator/components/com_civicrm/civicrm/CRM/Utils/System/Joomla.php on line 543
I then commented out that line, and got this:

Code: [Select]
PHP Fatal error:  Cannot redeclare class JApplicationCms in /home/nwtaadmin/public_html/libraries/cms/application/cms.php on line 20
Which I noticed was the next declaration in that block of code in the Joomla.php file.    After I commented out the entire block, the CRON job worked perfectly.

Evidently the USERID & PASSWORD validation functions are being called earlier in the process, and may no longer be needed here.     

I've not seen an issue trying to access the CiviCRM member lists from the front end, but I'm in the middle of testing that now.

This will need to be passed on to those in the developer group who oversee the Joomla integration.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: CRON not working since v4.5 install.
October 24, 2014, 06:55:16 pm
Can you put an issue in the issue tracker please? (http://issues.civicrm.org)  You can add a patch to that as well because it will need to be tested with earlier versions of Joomla to be sure that this isn't still a problem in 3.2.1.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

nzampella

  • I post occasionally
  • **
  • Posts: 61
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Joomla 3.3.6
  • MySQL version: 5.5.36
  • PHP version: 5.4.31
Re: CRON not working since v4.5 install.
October 24, 2014, 08:11:04 pm
Quote from: Dan C on October 24, 2014, 06:55:16 pm
Can you put an issue in the issue tracker please? (http://issues.civicrm.org)  You can add a patch to that as well because it will need to be tested with earlier versions of Joomla to be sure that this isn't still a problem in 3.2.1.

I added issue: CRM-15525

Did not add a patch, as I'm not associated with the project, and would not presume that any code I submit would actually correct the issue.   As I mentioned in the issue, I'm not sure if the error was caused by a change in Joomla v3.3.x, or in CiviCRM 4.5.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • CRON not working since v4.5 install.

This forum was archived on 2017-11-26.