I had a civicrm 4.4.6 site in my drupal 7 subdomain, which is beta.mydomain.com.
I want to have a backup site to perform update on civicrm, but it shows:
Fatal error: Cannot redeclare class CRM_Core_ClassLoader in /home/mydomain/www/backup/sites/all/modules/civicrm/CRM/Core/ClassLoader.php on line 36
Below is my setting scenario:
I created a subdomain, backup.mydomain.com, and copied all the files from beta site to backup site.
In beta site, these are the database: civicrm (drupal default database) and civicrmdb (civicrm database)
I had copied the database, as backup_civicrm and backup_civicrmdb
In backup site, I made the following changes:
sites/default/settings.php : change database name to backup_civicrm
sites/default/civicrm.settings.php :
- define( 'CIVICRM_UF_DSN' ) : change to backup_civicrm
- define( 'CIVICRM_DSN' ) : change to backup_civicrm
- $civicrm_root = '/home/mydomain/www/backup/sites/all/modules/civicrm';
- define( 'CIVICRM_TEMPLATE_COMPILEDIR', '/home/mydomain/www/backup/sites/default/files/civicrm/templates_c/' );
- define( 'CIVICRM_UF_BASEURL' , 'http://backup.mydomain.com/' );
- define( 'CIVICRM_MAIL_LOG', '/home/mydomain/www/backup/sites/default/files/civicrm/templates_c/mail.log' );
After configuration, my backup site shows error:
Fatal error: Cannot redeclare class CRM_Core_ClassLoader in /home/mydomain/www/backup/sites/all/modules/civicrm/CRM/Core/ClassLoader.php on line 36
I had cleared all the files in sites/default/files/civicrm/templates_c , and it does not work.
I found that when I change $civicrm_root to beta, it works.
$civicrm_root = '/home/mydomain/www/beta/sites/all/modules/civicrm';
This is weird. I need to perform upgrade on civicrm, if the root is link to beta, I'm not sure how this will affect my update.
Am I missing out any configuration? Any idea on what is the problem?