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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Overriding civicrm.settings.php causes Activity Processor to fail
Pages: [1]

Author Topic: Overriding civicrm.settings.php causes Activity Processor to fail  (Read 1253 times)

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Overriding civicrm.settings.php causes Activity Processor to fail
August 25, 2014, 09:36:55 am
For a long time, I have run Civicrm on Joomla with two separate databases, one for each.  This works fine except when upgrading when the default process assumes that Civicrm is inside the Joomla database and I need to update the two copies of civicrm.settings.php each time

I understand the recent changes to the conditional processing in civicrm.settings.php are designed to correct this.  Accordingly, I have defined CIVICRM_UF_DSN and CIVICRM_DSN in Joomla's configuration.php.

However, the Activity Processor job scheduled by cron is failing.  Presumably it does not load configuration.php and just takes the values in civicrm.settings.php?

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Overriding civicrm.settings.php causes Activity Processor to fail
August 25, 2014, 02:25:46 pm
Quote from: lsmithgo on August 25, 2014, 09:36:55 am
... the recent changes to the conditional processing in civicrm.settings.php ...

Are you referring to the if(!defined()) clauses in the new civicrm.settings.php template?

Code: [Select]
<?php
if (!defined('CIVICRM_DSN')) {
  
define( 'CIVICRM_DSN'           , '...' );
}

That was added as part of https://issues.civicrm.org/jira/browse/INFRA-124 . The goal in INFRA-124 is to allow, say, 5 concurrent test threads to use the same code but different DSNs. It's a bit easier to automatically inject the necessary logic if we don't have to worry about conflicts in civicrm.settings.php.

However, that problem is somewhat different from consolidating the configuration of CiviCRM-Joomla's two civicrm.settings.php files. Maybe you're talking about different changes?

Quote from: lsmithgo on August 25, 2014, 09:36:55 am
However, the Activity Processor job scheduled by cron is failing.  Presumably it does not load configuration.php and just takes the values in civicrm.settings.php?

I believe you are correct -- it doesn't load configuration.php. Most of Civi's backend scripts (e.g. "civicrm/bin/*.php") will bootstrap Civi before bootstrapping the CMS (thus loading civicrm.settings.php before configuration.php). Depending on the particular script, it may never bootstrap the CMS. AFAIK, we haven't made any changes to the order of file-loading.

Perhaps you can continue using your previous pattern for managing civicrm.settings.php ?

lsmithgo

  • I post occasionally
  • **
  • Posts: 82
  • Karma: 2
    • Soirees at Breinton
  • CiviCRM version: 4.5 beta 7
  • CMS version: Joomla 3.3.3
  • MySQL version: MySQLi 5.5.37-percona-sure1-log
  • PHP version: PHP 5.3.28
Re: Overriding civicrm.settings.php causes Activity Processor to fail
August 27, 2014, 03:23:48 pm
I will have to :-)

Is my use case - two separate databases - unusual?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Overriding civicrm.settings.php causes Activity Processor to fail
August 27, 2014, 03:51:09 pm

for joomla installs, i suspect yes, it is unusual

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • Overriding civicrm.settings.php causes Activity Processor to fail

This forum was archived on 2017-11-26.