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) »
  • Should the upgrade scripts remove Config.IDS.ini ?
Pages: [1]

Author Topic: Should the upgrade scripts remove Config.IDS.ini ?  (Read 738 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Should the upgrade scripts remove Config.IDS.ini ?
July 15, 2011, 10:20:51 am
Hi,

Should the upgrade scripts remove Config.IDS.ini ? It seems they don't currently but I think it might be a good idea if they did.

Currently in my experience Config.IDI.ini, once created, typically stays unchanged for many months, untouched by upgrades. In the meantime, CRM/Core/IDS.php changes from time to time and new fields get added to exceptions[] etc, but these won't be reflected in Config.IDS.ini unless it's manually deleted.

Worse, if the old Config.IDS.ini has paths (e.g. filter_path) referring to an older installation, e.g. because files/ got copied from an old drupal tree to a newer one, then those old paths will still be in Config.IDS.ini, which will continue to work if the old tree is still there but will suddenly throw a WSOD on all Civi pages when the old tree is cleaned out.  :o

What if people have customised their Config.IDS.ini? I would think the answer is: they shouldn't: it's a volatile file that gets created/recreated by CRM/Core/IDS.php and if customisations are needed, they should be done in a copy of CRM/Core/IDS.php under your custom PHP directory. That's just my understanding though, can anyone from the core team comment?

Thanks,

Dave J

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: Should the upgrade scripts remove Config.IDS.ini ?
July 15, 2011, 01:49:47 pm

hey davej:

the upgrade script does delete templates_c, which contains the Config (and also the log files). So the upgrade should delete that

can u run a test and check again on more recent versions. if so, we'll investigate and fix

thanx

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

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Should the upgrade scripts remove Config.IDS.ini ?
July 18, 2011, 03:19:43 am
Hi Lobo,

I'm looking at a site recently upgraded to 3.4.4 and here's the ConfigAndLog dir:

Code: [Select]
...files/civicrm/templates_c/en_US/ConfigAndLog$ ls -al
total 162528
drwxrwxr-x 2 www-data www-data     4096 2011-07-01 15:54 .
drwxrwxr-x 5 www-data www-data     4096 2011-06-17 14:55 ..
-rw-rw-r-- 1 www-data www-data 69065089 2010-05-13 12:34 CiviCRM.0c07549f29415eb35393aeefb9b1a2ea.log
-rw-rw-r-- 1 www-data www-data  9159770 2010-03-05 12:27 CiviCRM.28436a237efe4b75e4b87d9fa293e974.log
-rw-r--r-- 1 www-data www-data    23803 2011-07-14 15:37 CiviCRM.5674ba75484a76a6ef00dacd7ef3f56a.log
-rw-r--r-- 1 www-data www-data  1996667 2011-06-29 17:14 CiviCRM.5674ba75484a76a6ef00dacd7ef3f56a.log.201106011200
-rw-rw-r-- 1 www-data www-data  1079788 2011-04-24 14:12 CiviCRM.a119189afc1759b7a7a2c433d5272be0.log
-rw-rw-r-- 1 www-data www-data 84888156 2011-05-26 19:01 CiviCRM.e87d7da59e743d08df0e4edea6cb1467.log
-rw-rw-r-- 1 www-data www-data     1466 2010-02-03 16:04 Config.IDS.ini
-rw-rw-r-- 1 www-data www-data       56 2011-06-02 13:12 .htaccess
So Config.IDS.ini is 17 months old.

I see that CRM_Upgrade_Page_Upgrade::run() calls $config->cleanup( 1 , false ) which is what's called when &directoryCleanup=1 is added to a URL with debug on. This doesn't clear the ConfigAndLog dir in my experience. Just tested and indeed it doesn't. I think what's happening is confusion about locale. We're using en_GB and it seems that directoryCleanup=1 recreates this directory:

Code: [Select]
templates_c/en_US/en_GB/
however Config.IDS.ini is in:

Code: [Select]
templates_c/en_US/ConfigAndLog/
I've wondered why en_GB gets created under en_US, assumed it was some sort of reference to the "special relationship". ;) This is what we get under templates_c, after a directoryCleanup=1 at 2011-07-18 10:53:


Code: [Select]
templates_c/:
total 8
drwxrwxr-x 4 www-data www-data 4096 2011-05-27 17:32 en_GB
drwxrwxr-x 5 www-data www-data 4096 2011-07-18 10:53 en_US

templates_c/en_GB:
total 8
drwxrwxr-x 2 www-data www-data 4096 2010-03-02 14:53 ConfigAndLog
drwxrwxr-x 2 www-data www-data 4096 2010-03-02 14:53 en_GB

templates_c/en_GB/ConfigAndLog:
total 0

templates_c/en_GB/en_GB:
total 0

templates_c/en_US:
total 12
drwxrwxr-x  2 www-data www-data 4096 2011-07-01 15:54 ConfigAndLog
drwxr-xr-x 14 www-data www-data 4096 2011-07-18 10:53 en_GB
drwxrwxr-x 24 www-data www-data 4096 2011-05-27 17:32 en_US

templates_c/en_US/ConfigAndLog:
total 162516
-rw-rw-r-- 1 www-data www-data 69065089 2010-05-13 12:34 CiviCRM.0c07549f29415eb35393aeefb9b1a2ea.log
-rw-rw-r-- 1 www-data www-data  9159770 2010-03-05 12:27 CiviCRM.28436a237efe4b75e4b87d9fa293e974.log
-rw-r--r-- 1 www-data www-data    23803 2011-07-14 15:37 CiviCRM.5674ba75484a76a6ef00dacd7ef3f56a.log
-rw-r--r-- 1 www-data www-data  1996667 2011-06-29 17:14 CiviCRM.5674ba75484a76a6ef00dacd7ef3f56a.log.201106011200
-rw-rw-r-- 1 www-data www-data  1079788 2011-04-24 14:12 CiviCRM.a119189afc1759b7a7a2c433d5272be0.log
-rw-rw-r-- 1 www-data www-data 84888156 2011-05-26 19:01 CiviCRM.e87d7da59e743d08df0e4edea6cb1467.log
-rw-rw-r-- 1 www-data www-data     1466 2010-02-03 16:04 Config.IDS.ini

templates_c/en_US/en_GB:
total 48
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%02
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%0E
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%0F
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%25
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%79
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%8B
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%93
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%9B
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%9D
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%C6
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%E8
drwxr-x--x 3 www-data www-data 4096 2011-07-18 10:53 %%F0

templates_c/en_US/en_US:
total 88
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%02
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%06
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%0C
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%0E
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%0F
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%25
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%39
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%44
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%4D
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%55
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%63
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%79
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%93
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%9D
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%AD
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%C6
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%C8
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%CC
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%CD
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%E8
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%EF
drwxrwxr-x 3 www-data www-data 4096 2011-05-27 17:32 %%F0

This is the directory structure we typically see on en_GB sites but I'm guessing this may not be how it's intended to be?

Dave J

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Should the upgrade scripts remove Config.IDS.ini ?

This forum was archived on 2017-11-26.