0

Running Joomla 3.9.0 Civicrm 5.7.0 PHP 7.0.2

Recently update Civicrm to 5.7.0 - Prior version and my cron job was working fine. Now it hasn't run since November 7th

Run cli.php

php /var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/bin/cli.php -s domain_name.com -u user -p password -e Job -a execute

Output is

PHP Warning:  include_once(/var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/../..//default/civicrm.settings.php): failed to open stream: No such file or directory in /var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/civicrm.config.php on line 118
PHP Warning:  include_once(): Failed opening '/var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/../..//default/civicrm.settings.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/civicrm.config.php on line 118
Could not load the settings file at: /var/www/clients/client1/web2/web/administrator/components/com_civicrm/civicrm/../..//default/civicrm.settings.php

I have looked at some of the patches. But the patches are older than the version I have.

Any help would be greatly appreciated. Thank you

  • 1
    I haven't noticed any problem with CiviCRM 5.7.0 on Joomla 3.9.0 and PHP 7.1.24. Use only cli.php with Joomla as cron.php has not worked on Joomla since J 3.8.0 (I haven't tested on 3.9.0). Also you are using cron.php incorrectly - it must be called via wget/curl and the URL of cron.php. cli.php should work with CiviCRM 5.7.0 out of the box. – Andrew Thompson Nov 21 '18 at 6:51
  • Since you state cron.php hasn't worked since 3.8.0, then I guess not using wget/curl doesn't make any difference. How about the cli.php errors I received? Am I implementing it wrong? – Chuck Nov 22 '18 at 21:47
  • Your cli.php command looks correct to me. – Andrew Thompson Nov 23 '18 at 6:12
0

Check your administrator/components/com_civicrm/civicrm/civicrm.config.php file. It should be only 12 lines long and look like the following:

<?php
define('CIVICRM_SETTINGS_PATH', '<www root>/administrator/components/com_civicrm/civicrm.settings.php');
$error = @include_once( '<www root>/administrator/components/com_civicrm/civicrm.settings.php' );
if ( $error == false ) {
    echo "Could not load the settings file at: <www root>/administrator/components/com_civicrm/civicrm.settings.php
";
    exit( );
}

// Load class loader
require_once $civicrm_root . '/CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();

The 3 paths to civicrm.settings.php within civicrm.config.php should all be absolute. Your PHP warnings show that /../..//default/ is in the path, which is incorrect for Joomla. I can't explain how it (or code that is generating it) ended up in your civicrm.config.php; this forum post might give a clue. If your civicrm.config.php is not as per the above, replace it with this, substituting with the correct path.

  • The forum post you pointed is the issue except I have never had a Drupal setup. I checked the latest civicrm-5.7.2-joomla.zip and the civicrm.config.php file is 127 lines, not 12 lines (which I'm guessing is wrong). After coping my previous config & setting.php. I get a new error, db_error, connect failed. Interesting I changed the cron job to use my previous php (5.6.16) and it works once again. – Chuck Nov 24 '18 at 0:15
  • administrator/components/com_civicrm/civicrm/civicrm.config.php really is only 12 lines on a Joomla installation. Yes there is a civicrm.config.php file that is 127 lines (which is really for Drupal due to CiviCRM's Drupal origin) within civicrm.zip in civicrm-5.7.2-joomla.zip however the 12-line civicrm.config.php is created during installation. I just did a clean installation of Joomla and CiviCRM to confirm that this is the case. – Andrew Thompson Nov 24 '18 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.