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 »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • broken civicrm after restoring from snapshot
Pages: [1]

Author Topic: broken civicrm after restoring from snapshot  (Read 1131 times)

bsutton

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: drupal 7
  • MySQL version: mysql 5.5.29
  • PHP version: php5
broken civicrm after restoring from snapshot
April 18, 2013, 04:06:14 am
My civicrm system is hosted on linode using ubuntu.

During development I accidently attached to my production db and deleted some stuff .... arg.

So I decieded to restore from the latest VM snapshot.
This all went smoothly until I attempted access civic and which point I got the following errors:

PHP Fatal error:  require_once(): Cannot redeclare class crm_core_classloader in /usr/share/drupal7/sites/all/modules/drupal/civicrm.module on line 278
PHP Fatal error:  Cannot redeclare class CRM_Core_ClassLoader in /usr/share/drupal7/sites/all/modules/civicrm/CRM/Core/ClassLoader.php on line 41

After some investigation I see that people have this error when migrating to a new system and the ip address changes. This is not the case for me as I restored from a snapshot and for all intents and purposes the system is identical.

I stuck the following at the top of the ClassLoader.php:

foreach (get_included_files() as $file) {
  echo "$file<BR>";
}

In the resulting output I noted the following two lines (complete listing at the bottom of this post).
/usr/share/drupal7/sites/all/modules/CRM/Core/ClassLoader.php
/usr/share/drupal7/sites/default/civicrm.settings.php
/usr/share/drupal7/sites/all/modules/civicrm/CRM/Core/ClassLoader.php

Note: that I seem to have two version of this file.
Once I renamed one of the ClassLoaders loaders everything started working fine.

What I don't understand is how I got two of these loaders. The only thing I can thing of is that I've just started working on a Civicrm extension and so I've added the necessary tooling to make this happen. Could this have added a second ClassLoader instance?

What is the correct method to fix this problem?

Thanks in advance,
Brett

/usr/share/drupal7/index.php
/usr/share/drupal7/includes/bootstrap.inc
/usr/share/drupal7/sites/default/settings.php
/usr/share/drupal7/sites/default/dbconfig.php
/usr/share/drupal7/includes/cache.inc
/usr/share/drupal7/includes/database/database.inc
/usr/share/drupal7/includes/lock.inc
/usr/share/drupal7/includes/database/mysql/database.inc
/usr/share/drupal7/includes/module.inc
/usr/share/drupal7/modules/dblog/dblog.module
/usr/share/drupal7/sites/all/modules/feeds/feeds.module
/usr/share/drupal7/modules/overlay/overlay.module
/usr/share/drupal7/sites/all/modules/rules/rules.module
/usr/share/drupal7/includes/session.inc
/usr/share/drupal7/includes/common.inc
/usr/share/drupal7/includes/path.inc
/usr/share/drupal7/includes/theme.inc
/usr/share/drupal7/includes/pager.inc
/usr/share/drupal7/includes/database/select.inc
/usr/share/drupal7/includes/database/query.inc
/usr/share/drupal7/includes/menu.inc
/usr/share/drupal7/includes/tablesort.inc
/usr/share/drupal7/includes/file.inc
/usr/share/drupal7/includes/stream_wrappers.inc
/usr/share/drupal7/includes/unicode.inc
/usr/share/drupal7/includes/image.inc
/usr/share/drupal7/includes/form.inc
/usr/share/drupal7/includes/mail.inc
/usr/share/drupal7/includes/actions.inc
/usr/share/drupal7/includes/ajax.inc
/usr/share/drupal7/includes/token.inc
/usr/share/drupal7/includes/errors.inc
/usr/share/drupal7/modules/block/block.module
/usr/share/drupal7/sites/all/modules/webform/webform.module
/usr/share/drupal7/sites/all/modules/advanced_help/advanced_help.module
/usr/share/drupal7/modules/aggregator/aggregator.module
/usr/share/drupal7/sites/all/modules/attachment_links/attachment_links.module
/usr/share/drupal7/sites/all/modules/attachment_links/attachment_links.field-formatters.inc
/usr/share/drupal7/sites/all/modules/backup_migrate/backup_migrate.module
/usr/share/drupal7/sites/all/modules/basic_webmail/basic_webmail.module
/usr/share/drupal7/sites/all/modules/beautytips/beautytips.module
/usr/share/drupal7/modules/blog/blog.module
/usr/share/drupal7/modules/book/book.module
/usr/share/drupal7/sites/all/modules/captcha/captcha.module
/usr/share/drupal7/sites/all/modules/civicrm_activity_ical/civicrm_activity_ical.module
/usr/share/drupal7/sites/all/modules/civicrm_activity_ical/functions.php
/usr/share/drupal7/sites/all/modules/civicrm_activity_ical/civi_hooks.php
/usr/share/drupal7/sites/all/modules/drupal/modules/civicrm_contact_ref/civicrm_contact_ref.module
/usr/share/drupal7/sites/all/modules/drupal/modules/civicrm_engage/civicrm_engage.module
/usr/share/drupal7/sites/all/modules/civicrm_events/civicrm_events.module
/usr/share/drupal7/sites/all/modules/drupal/modules/civicrm_group_roles/civicrm_group_roles.module
/usr/share/drupal7/sites/all/modules/drupal/modules/civicrm_member_roles/civicrm_member_roles.module
/usr/share/drupal7/sites/all/modules/drupal/modules/civicrm_rules/civicrm_rules.module
/usr/share/drupal7/modules/color/color.module
/usr/share/drupal7/sites/all/modules/colorbox/colorbox.module
/usr/share/drupal7/modules/comment/comment.module
/usr/share/drupal7/includes/entity.inc
/usr/share/drupal7/modules/contact/contact.module
/usr/share/drupal7/sites/all/modules/context/context.module
/usr/share/drupal7/sites/all/modules/context/context.core.inc
/usr/share/drupal7/modules/contextual/contextual.module
/usr/share/drupal7/sites/all/modules/context/context_layouts/context_layouts.module
/usr/share/drupal7/sites/all/modules/ctools/ctools.module
/usr/share/drupal7/modules/dashboard/dashboard.module
/usr/share/drupal7/sites/all/modules/draggable_captcha/draggable_captcha.module
/usr/share/drupal7/sites/all/modules/email/email.module
/usr/share/drupal7/sites/all/modules/encrypt/encrypt.module
/usr/share/drupal7/sites/all/modules/entity/entity.module
/usr/share/drupal7/sites/all/modules/entity/modules/callbacks.inc
/usr/share/drupal7/sites/all/modules/entity/includes/entity.property.inc
/usr/share/drupal7/sites/all/modules/entity/entity_token.module
/usr/share/drupal7/sites/all/modules/faq/faq.module
/usr/share/drupal7/sites/all/modules/feeds/feeds_import/feeds_import.module
/usr/share/drupal7/sites/all/modules/feeds/feeds_import/feeds_import.features.inc
/usr/share/drupal7/sites/all/modules/feeds/feeds_news/feeds_news.module
/usr/share/drupal7/sites/all/modules/feeds/feeds_news/feeds_news.features.inc
/usr/share/drupal7/sites/all/modules/feeds/feeds_ui/feeds_ui.module
/usr/share/drupal7/modules/field/field.module
/usr/share/drupal7/modules/field/field.crud.inc
/usr/share/drupal7/modules/field/field.default.inc
/usr/share/drupal7/modules/field/field.info.inc
/usr/share/drupal7/modules/field/field.multilingual.inc
/usr/share/drupal7/modules/field/field.attach.inc
/usr/share/drupal7/modules/field/field.form.inc
/usr/share/drupal7/modules/field/modules/field_sql_storage/field_sql_storage.module
/usr/share/drupal7/modules/file/file.module
/usr/share/drupal7/modules/file/file.field.inc
/usr/share/drupal7/sites/all/modules/media/file_entity/file_entity.module
/usr/share/drupal7/sites/all/modules/media/file_entity/file_entity.file_api.inc
/usr/share/drupal7/sites/all/modules/media/file_entity/file_entity.field.inc
/usr/share/drupal7/modules/filter/filter.module
/usr/share/drupal7/modules/help/help.module
/usr/share/drupal7/modules/image/image.module
/usr/share/drupal7/modules/image/image.field.inc
/usr/share/drupal7/sites/all/modules/imce/imce.module
/usr/share/drupal7/sites/all/modules/imce_wysiwyg/imce_wysiwyg.module
/usr/share/drupal7/sites/all/modules/job_scheduler/job_scheduler.module
/usr/share/drupal7/sites/all/modules/job_scheduler/modules/job_scheduler_trigger/job_scheduler_trigger.module
/usr/share/drupal7/sites/all/modules/jquery_update/jquery_update.module
/usr/share/drupal7/sites/all/modules/libraries/libraries.module
/usr/share/drupal7/modules/field/modules/list/list.module
/usr/share/drupal7/sites/all/modules/locationmap/locationmap.module
/usr/share/drupal7/sites/all/modules/media/media.module
/usr/share/drupal7/sites/all/modules/media/includes/media.variables.inc
/usr/share/drupal7/sites/all/modules/media/includes/media.types.inc
/usr/share/drupal7/sites/all/modules/media/includes/media.fields.inc
/usr/share/drupal7/sites/all/modules/media/includes/media.filter.inc
/usr/share/drupal7/sites/all/modules/media/modules/media_internet/media_internet.module
/usr/share/drupal7/sites/all/modules/memcache/memcache.module
/usr/share/drupal7/sites/all/modules/memcache/memcache_admin/memcache_admin.module
/usr/share/drupal7/modules/menu/menu.module
/usr/share/drupal7/modules/node/node.module
/usr/share/drupal7/modules/field/modules/number/number.module
/usr/share/drupal7/modules/openid/openid.module
/usr/share/drupal7/modules/field/modules/options/options.module
/usr/share/drupal7/modules/path/path.module
/usr/share/drupal7/sites/all/modules/pathologic/pathologic.module
/usr/share/drupal7/modules/php/php.module
/usr/share/drupal7/sites/all/modules/r4032login/r4032login.module
/usr/share/drupal7/modules/rdf/rdf.module
/usr/share/drupal7/sites/all/modules/rules/rules_scheduler/rules_scheduler.module
/usr/share/drupal7/sites/all/modules/scouts/scouts.module
/usr/share/drupal7/modules/search/search.module
/usr/share/drupal7/modules/shortcut/shortcut.module
/usr/share/drupal7/sites/all/modules/slickgrid/slickgrid.module
/usr/share/drupal7/modules/system/system.module
/usr/share/drupal7/modules/taxonomy/taxonomy.module
/usr/share/drupal7/modules/field/modules/text/text.module
/usr/share/drupal7/modules/trigger/trigger.module
/usr/share/drupal7/modules/update/update.module
/usr/share/drupal7/modules/user/user.module
/usr/share/drupal7/sites/all/modules/ctools/views_content/views_content.module
/usr/share/drupal7/sites/all/modules/views_pdf/views_pdf.module
/usr/share/drupal7/sites/all/modules/views_slideshow/views_slideshow.module
/usr/share/drupal7/sites/all/modules/views_slideshow/theme/views_slideshow.theme.inc
/usr/share/drupal7/sites/all/modules/views_slideshow/contrib/views_slideshow_cycle/views_slideshow_cycle.module
/usr/share/drupal7/sites/all/modules/views_slideshow/contrib/views_slideshow_cycle/theme/views_slideshow_cycle.theme.inc
/usr/share/drupal7/sites/all/modules/wysiwyg/wysiwyg.module
/usr/share/drupal7/sites/all/modules/ckeditor_link/ckeditor_link.module
/usr/share/drupal7/sites/all/modules/field_group/field_group.module
/usr/share/drupal7/sites/all/modules/views/views.module
/usr/share/drupal7/sites/all/modules/features/features.module
/usr/share/drupal7/sites/all/modules/ctools/page_manager/page_manager.module
/usr/share/drupal7/sites/all/modules/admin_menu/admin_menu.module
/usr/share/drupal7/sites/all/modules/drupal/civicrm.module
/usr/share/drupal7/sites/all/modules/drupal/civicrm_user.inc
/usr/share/drupal7/profiles/standard/standard.profile
/usr/share/drupal7/themes/engines/phptemplate/phptemplate.engine
/usr/share/drupal7/themes/garland/template.php
/usr/share/drupal7/sites/all/modules/ctools/includes/plugins.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_path.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_context.inc
/usr/share/drupal7/sites/all/modules/ctools/includes/export.inc
/usr/share/drupal7/includes/database/schema.inc
/usr/share/drupal7/includes/database/mysql/schema.inc
/usr/share/drupal7/includes/database/mysql/query.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_node.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_sitewide.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_user.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_user_page.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_menu.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_views.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_book.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_bookroot.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_node_taxonomy.inc
/usr/share/drupal7/sites/all/modules/context/plugins/context_condition_taxonomy_term.inc
/usr/share/drupal7/sites/all/modules/rules/modules/events.inc
/usr/share/drupal7/sites/all/modules/CRM/Core/ClassLoader.php
/usr/share/drupal7/sites/default/civicrm.settings.php
/usr/share/drupal7/sites/all/modules/civicrm/CRM/Core/ClassLoader.php





Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: broken civicrm after restoring from snapshot
April 18, 2013, 05:05:14 am
I would suggest you change the name of civicrm.settings.php and reinstall into a fresh DB as a test and then compare the new civicrm.settings.php to the old.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: broken civicrm after restoring from snapshot
April 18, 2013, 06:45:38 am

might want to ensure you only have one copy of CiviCRM under your sites/all/modules directory

seems like there are two copies right now,

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

bsutton

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: drupal 7
  • MySQL version: mysql 5.5.29
  • PHP version: php5
Re: broken civicrm after restoring from snapshot
April 19, 2013, 07:36:03 am
So the questions how would I have ended up with two copies. I certainly didn't manually install a second copy?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: broken civicrm after restoring from snapshot
April 19, 2013, 07:39:40 am
Quote from: bsutton on April 18, 2013, 04:06:14 am
In the resulting output I noted the following two lines (complete listing at the bottom of this post).
/usr/share/drupal7/sites/all/modules/CRM/Core/ClassLoader.php
/usr/share/drupal7/sites/default/civicrm.settings.php
/usr/share/drupal7/sites/all/modules/civicrm/CRM/Core/ClassLoader.php

The first file there should not exist. The third file is correct.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • broken civicrm after restoring from snapshot

This forum was archived on 2017-11-26.