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) »
  • 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
Pages: [1] 2

Author Topic: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found  (Read 3313 times)

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 22, 2012, 05:51:28 am
Hello,

I'm trying to update my civicrm version from 4.1.5 to 4.2 (stable release). I followed all the steps as described in the wiki page, but when I point my web browser to the following URL :  xxx/civicrm/upgrade?reset=1 or xxx /?q=civicrm/upgrade&reset=1 it doesn't start the update script.

I've the following error message => Fatal error: Class 'CRM_Core_Config_Variables' not found in /xxx/sites/all/modules/civicrm/CRM/Core/Config.php on line 43

Any idea of how to fix this ?
Thanks in advance

Configuration :
Drupal 7.14 - PHP Version 5.3.14 - MySQL Server version: 5.1.31/Client version: 5.0.51a
« Last Edit: August 22, 2012, 06:07:43 am by SemperFi »

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 23, 2012, 05:37:56 am
Just updated to Drupal 7.15 => nothing changed - error with CIVICRM still happens when launching the upgrade script.

Fatal error: Class 'CRM_Core_Config_Variables' not found in /xxx/sites/all/modules/civicrm/CRM/Core/Config.php on line 43

Any idea ?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 23, 2012, 10:51:51 am
Haven't seen this one so far. Seems like the autoloader for php classes is not kicking in or maybe all the .php files aren't where they should be (incomplete upload of new codebase ???). Any other clues on your side? Do you get that error on all CiviCRM url's?
Protect your investment in CiviCRM by  becoming a Member!

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 23, 2012, 02:27:50 pm
That is strange. A couple things you might try:

1) If you have other Civi-related modules, try disabling them before the upgrade. Other modules sometimes "bootstrap" Civi in a different way or time which doesn't work (or, rather, which won't work until after the upgrade finishes).

2) Make sure there isn't an extra (old) copy of CiviCRM anywhere in the directory tree. One can sometimes see strange class-loading errors if you don't fully remove the old source tree. (For example, renaming "sites/all/modules/civicrm" to "sites/all/modules/civicrm.bak" can leave an extra copy of CiviCRM.) Similarly, if you've ever customized the include path, you might check to make sure there's no extra copy of Civi in there.

3) Try manually adding this to the bottom of civicrm.settings.php:

Code: [Select]
require_once 'CRM/Core/ClassLoader.php';
CRM_Core_ClassLoader::singleton()->register();

That change should be applied automatically during the upgrade -- I haven't needed to do that manually, but it's an easy to thing to try.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 02:59:45 am
Hello,

Thanks for your answers, very helpful.

Good news : I remove an old copy of civicrm that was stored in an "old_civicrm" folder and the upgrade process started !

BUT
the upgrade process failed with the 4.2_alpa_1 update. [Error: Upgrade DB to 4.2.alpha1] DB Error: unknown error
I skip this upgrade and the others updates went well. But now when I want to open a contact or search for contacts I have an error page saying :  "Sorry but we are not able to provide this at the moment. - DB Error: no such table"

SO
I reload my previous backup and decided to test the queries included in the 4.2.alpha1.mysql_tpl file directly in the database using phpmyadmin.

Here is the error :

MySQL a répondu:Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{localize field='label'}label{/localize}, value, name, weight, {localize field='' at line 2

Code: [Select]
INSERT INTO civicrm_option_value(
option_group_id,
{localize field = 'label'}label{ / localize},
value,
name,
weight,
{localize field = 'description'}description{ / localize},
is_active,
component_id
)
VALUES (
@option_group_id_report , {localize} 'Mail Detail Report'{ / localize}, 'mailing/detail', 'CRM_Report_Form_Mailing_Detail', @weight := @weight +1, {localize} 'Provides reporting on Intended and Successful Deliveries, Unsubscribes and Opt-outs, Replies and Forwards.'{ / localize}, 1, @mailCompId
);

Any idea to excecute the queries contained in the 4.2.alpha1.mysql_tpl ??

Thanks

Updates :
the following SQL queries in 4.2.alpha1.mysql_tpl don't work either :
--batch type and batch status option groups
--default profile for contribution and membership batch entry
--navigation menu entries
-- CRM-9783 => error on INSERT INTO`civicrm_option_group` (`name`, {localize field='title'}`title`{/localize}, `is_reserved`, `is_active`) :: check the manual that corresponds to your MySQL server version for the right syntax to use near '{localize field='title'}`title`{/localize}, `is_reserved`, `is_active`) VALUES ...

I didn't pursue further the testing of the other queries in 4.2.alpha1.mysql_tpl....
« Last Edit: August 24, 2012, 05:48:28 am by SemperFi »

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 06:25:14 am
The templating is the issue.  That SQL wasn't intended to be run exactly as it's typed - it's meant to be parsed first.  For instance, the part that reads:
{localize field = 'label'}label{ / localize},

Should be replaced with your language's word for "label".  That you could work around, but the variable substitutions (the words starting with an "@") aren't going to substitute so easily.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 06:51:46 am
@JonGold : OK thanks for your explanation. I was suspecting something like that :) It means that I won't be able to determine what is the issue behind this error message during the first step of the upgrade process : 4.2_alpa_1 update. [Error: Upgrade DB to 4.2.alpha1] DB Error: unknown error

Any idea of how we could get it work ?

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 06:59:56 am
Hi SemperFi,

I'm not 100% clear from your description - after you removed the old_civicrm directory and rolled back your databases, did you try running the upgrade again normally?  I suspect it will work.

Or rather...it depends on how you rolled back your databases.  I would recommend dropping all tables in the database before restoring your backup and then trying again.  Civi 4.2 creates new tables, so simply restoring your backup won't touch any 4.2-specific tables, and that's likely to screw up the upgrade.
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 07:17:31 am
@JonGold
This is exactly what I did :)
1- Remove all previous version of civicrm code files (the old-civicrm folder)
2- Drop all the tables in the database
3- Restore backup of my previous database : civicrm 4.15 (fyi : my civicrm tables have always been separated from the drupal database)
4- Run the upgrade to 4.2 => get this error at first step : 4.2_alpa_1 update. [Error: Upgrade DB to 4.2.alpha1] DB Error: unknown error

I did try already twice steps 2, 3 and 4 here above - no sucess.
Tks for your time

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 07:44:45 am
SemperFi,

If you could look at the log at the point when you get "[Error: Upgrade DB to 4.2.alpha1] DB Error: unknown error" problem and give us detailed error, will help us give you a solution and make fixes in core which will avoid such problems in next release.

Just importing 4.2.alpha1.mysql_tpl wouldn't help since the file is used in combination with php by upgrade process.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 07:50:35 am
Deepak
Our website is hosted on a mutualized server so I'm not sure to be able to check the server log.
Can you precise the log you want me to check ?
Thanks

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 08:37:07 am
SemperFi, Apache and sql logs. If you have civicrm debugging & backtrace switched on, should also display a bit more detailed error (apache / sql logs are preferred though).
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 24, 2012, 08:53:29 am
Deepak,
Please find attached the details of the DB_Error - during the query to upgrade DB to 4.2.alpha1.
If you have any idea, please let me know :)
Tks
« Last Edit: August 24, 2012, 09:02:21 am by SemperFi »

Deepak Srivastava

  • Moderator
  • Ask me questions
  • *****
  • Posts: 677
  • Karma: 65
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 25, 2012, 03:44:03 am
Do you have these tables present - civicrm_contribution_page, civicrm_event & civicrm_group ? If yes do they have foreign keys FK_civicrm_contribution_page_payment_processor_id, FK_civicrm_event_payment_processor_id and FK_civicrm_group_saved_search_id respectively present ?

If nothing from above is missing, send me your database dump for investigation to: deepak at webaccess dot co dot in.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: 4.2 Updating error : class 'CRM_Core_Config_Variables' not found
August 25, 2012, 07:01:54 am
Hello Deepak
Please find enclosed the detail of FK for civicrm_contribution_page, civicrm_event & civicrm_group tables.
These foreign keys below are respectively present in the tables.
FK_civicrm_contribution_page_payment_processor_id,
FK_civicrm_event_payment_processor_id
FK_civicrm_group_saved_search_id respectively present

I will send you the dump - without values regarding our activities/organization - for confidential reason regarding our people.
Thanks for your help !

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • 4.2 Updating error : class 'CRM_Core_Config_Variables' not found

This forum was archived on 2017-11-26.