Answers.Body: <p>I tried an intermediary update with the 4.6.36 with PHP 5 and, while I still have some update errors (I will open separate tickets if I cannot find the solution by myself), I do no longer have this one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-07T15:08:49.987Z
Answers.LastActivityDate: 2018-05-07T15:08:49.987Z
Answers.UserDisplayName: Ash_Crow
Answers.Body: <p>As answered by @davejenx here (<a href="https://civicrm.stackexchange.com/questions/3978/cannot-redeclare-class-crm-core-classloader-in-backup-site">&quot;Cannot redeclare class CRM_Core_ClassLoader&quot; in backup site</a>) this could be your issue. </p>
  
  <blockquote>
    <p>It sounds as though there is either a cached path to ClassLoader.php somewhere or there are two copies of the CiviCRM code under your modules directories. Various scenarios and solutions are discussed in this forum post: svn installation says "Cannot redeclare class CRM_Core_ClassLoader" Please post back here rather than on the forum, though.</p>
    
    <p>If you're sure that there aren't multiple copies of CiviCRM under /home/mydomain/www/backup/ then the most likely fix is to clear the Drupal variable civicrm_class_loader, e.g. using drush:</p>
    
    <p><code>drush vset civicrm_class_loader ''</code></p>
    
    <p>There's a good chance the fatal error will prevent the use of drush. In that case, you can delete the row from Drupal's variable table where name = 'civicrm_class_loader'. It's possible the variables are cached in addition -- you may need to clear Drupal's cache tables manually. (A targeted approach -- in Drupal 6, anyway -- is to delete the row from Drupal's cache table where cid = 'variables'.)</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T08:37:05.340Z
Answers.Text: I already saw this post but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm_class_loader ''" command and now I have a new error message:
Answers.UserDisplayName: Ash_Crow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T08:40:28.097Z
Answers.Text: "2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr: "PHP message: PHP Fatal error:  require_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.:<civicrm_old_root_path>/sites/all/modules/civicrm:<civicrm_old_root_path>/sites/all/modules/civicrm/packages:.:/usr/share/php') in <civicrm_root_path>/sites/default/civicrm.settings.php on line 280" while reading response header from upstream [...]"
Answers.UserDisplayName: Ash_Crow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T08:42:45.443Z
Answers.Text: With <civicrm_old_root_path> being the root path on the previous server, so it must be cached somewhere, but I cannot find where... (sorry for the answer in 3 comments, I hit the character limit)
Answers.UserDisplayName: Ash_Crow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-03T22:35:00.747Z
Answers.Text: Did you try this? 
  
  1) Comment following lines in civicrm.settings.php :
  
  require_once 'CRM/Core/ClassLoader.php';
  CRM_Core_ClassLoader::singleton()->register();
  
  2) Take backup of variable table in database & delete the row with name = 'civicrm_class_loader'.
  
  3) With this your civicrm page should get loaded.
  
  4) Now clear civicrm caches or hit "http://your_site/civicrm/menu/rebuild?reset=1" url.
  
  5) Uncomment the above lines.
  
  this answer: (https://civicrm.stackexchange.com/a/14840/5649)
Answers.UserDisplayName: Chamil Wijesooriya
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-04T09:25:10.137Z
Answers.Text: I tried it and it didn't work, I still have the errors.
Answers.UserDisplayName: Ash_Crow
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-25T04:49:26.390Z
Answers.Text: Seems this is an impossible scenario...;(
Answers.UserDisplayName: Bruno  Vincent
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-30T21:09:17.423Z
Answers.LastActivityDate: 2018-04-30T21:09:17.423Z
Answers.UserDisplayName: Chamil Wijesooriya
Body: <p>I am trying to migrate a Drupal+CiviCRM from an old server to a new one.</p>
  
  <p>I copied the files and database, updated civicrm.settings.php and settings.php, cleared the cache and made a drush up + drush updb, both ran fine.</p>
  
  <p>As the new server uses PHP 7.0, I downloaded civicrm-4.7.31 drupal and l10n files to replace the version 4.4.19 that was used. However, I still have a white screen when going to the homepage.</p>
  
  <p>In /var/log/nginx/error.log, I can find this error:</p>
  
  <pre><code>2018/04/30 17:54:16 [error] 20389#20389: *845 FastCGI sent in stderr:
  "PHP message: PHP Fatal error:  Cannot redeclare civicrm_enable()
  (previously declared in
  &lt;civicrm_root_path&gt;/sites/all/modules/civicrm/drupal/civicrm.module:781)
  in
  &lt;civicrm_root_path&gt;/sites/all/modules/civicrm/drupal/civicrm.install
  on line 40" while reading response header from upstream, client:
  XXX.XXX.XXX.XXX, server: XXXX, request: "GET / HTTP/1.1", upstream:
  "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXX"
  </code></pre>
  
  <p>Edit:
  I already saw <a href="https://civicrm.stackexchange.com/questions/3978/cannot-redeclare-class-crm-core-classloader-in-backup-site">this post</a> but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm_class_loader ''" command and now I have a new error message: </p>
  
  <pre><code>"2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr:
  "PHP message: PHP Fatal error: require_once(): Failed opening required
  'CRM/Core/ClassLoader.php'
  (include_path='.:&lt;civicrm_old_root_path&gt;/sites/all/modules/civicrm:&lt;civicrm_old_root_path&gt;/sites/all/modules/civicrm/packages:.:/usr/share/php')
  &gt; in &lt;civicrm_root_path&gt;/sites/default/civicrm.settings.php on line 280"
  &gt; while reading response header from upstream [...]"
  </code></pre>
  
  <p>With  being the root path on the previous server, so it must be cached somewhere, but I cannot find where. This error disappears after a drush cc.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-04-30T21:09:35.323Z
Comments.Text: Possible duplicate of ["Cannot redeclare class CRM\_Core\_ClassLoader" in backup site](https://civicrm.stackexchange.com/questions/3978/cannot-redeclare-class-crm-core-classloader-in-backup-site)
Comments.UserDisplayName: Chamil Wijesooriya
Tags: <drupal><migration>
Title: Cannot redeclare civicrm_enable()
ThreadText: # Cannot redeclare civicrm_enable()
  
  (Asked by: username_0 on 2018-04-30)
  
  I am trying to migrate a Drupal+CiviCRM from an old server to a new one.
  I copied the files and database, updated civicrm.settings.php and settings.php, cleared the cache and made a drush up + drush updb, both ran fine.
  As the new server uses PHP 7.0, I downloaded civicrm-4.7.31 drupal and l10n files to replace the version 4.4.19 that was used. However, I still have a white screen when going to the homepage.
  In /var/log/nginx/error.log, I can find this error:
  2018/04/30 17:54:16 [error] 20389#20389: *845 FastCGI sent in stderr:
  "PHP message: PHP Fatal error:  Cannot redeclare civicrm_enable()
  (previously declared in
  /sites/all/modules/civicrm/drupal/civicrm.module:781)
  in
  /sites/all/modules/civicrm/drupal/civicrm.install
  on line 40" while reading response header from upstream, client:
  XXX.XXX.XXX.XXX, server: XXXX, request: "GET / HTTP/1.1", upstream:
  "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "XXXX"
  
  Edit:
  I already saw this post but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm_class_loader ''" command and now I have a new error message: 
  "2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr:
  "PHP message: PHP Fatal error: require_once(): Failed opening required
  'CRM/Core/ClassLoader.php'
  (include_path='.:/sites/all/modules/civicrm:/sites/all/modules/civicrm/packages:.:/usr/share/php')
  > in /sites/default/civicrm.settings.php on line 280"
  > while reading response header from upstream [...]"
  
  With  being the root path on the previous server, so it must be cached somewhere, but I cannot find where. This error disappears after a drush cc.
  
  **Tags:** drupal, migration
  
  > **Comments:**
  > **username_1**: Possible duplicate of ["Cannot redeclare class CRM\_Core\_ClassLoader" in backup site](https://civicrm.stackexchange.com/questions/3978/cannot-redeclare-class-crm-core-classloader-in-backup-site)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-05-07. Score: 1 | Accepted answer
  
  I tried an intermediary update with the 4.6.36 with PHP 5 and, while I still have some update errors (I will open separate tickets if I cannot find the solution by myself), I do no longer have this one.
  
  
  ---
  
  ### Answer by username_1 on 2018-04-30. Score: 2
  
  As answered by @davejenx here (["Cannot redeclare class CRM\_Core\_ClassLoader" in backup site](https://civicrm.stackexchange.com/questions/3978/cannot-redeclare-class-crm-core-classloader-in-backup-site)) this could be your issue.
  
  > It sounds as though there is either a cached path to ClassLoader.php somewhere or there are two copies of the CiviCRM code under your modules directories. Various scenarios and solutions are discussed in this forum post: svn installation says "Cannot redeclare class CRM\_Core\_ClassLoader" Please post back here rather than on the forum, though.
  >
  > If you're sure that there aren't multiple copies of CiviCRM under /home/mydomain/www/backup/ then the most likely fix is to clear the Drupal variable civicrm\_class\_loader, e.g. using drush:
  >
  > `drush vset civicrm_class_loader ''`
  >
  > There's a good chance the fatal error will prevent the use of drush. In that case, you can delete the row from Drupal's variable table where name = 'civicrm\_class\_loader'. It's possible the variables are cached in addition -- you may need to clear Drupal's cache tables manually. (A targeted approach -- in Drupal 6, anyway -- is to delete the row from Drupal's cache table where cid = 'variables'.)
  
  > **Comments:**
  > **username_0**: I already saw this post but that didn't help me fix my issue. I have only one copy of CiviCRM under my module directory. I tried the "drush vset civicrm_class_loader ''" command and now I have a new error message:  
  > **username_0**: "2018/05/03 10:36:07 [error] 7010#7010: *2972 FastCGI sent in stderr: "PHP message: PHP Fatal error:  require_once(): Failed opening required 'CRM/Core/ClassLoader.php' (include_path='.:<civicrm_old_root_path>/sites/all/modules/civicrm:<civicrm_old_root_path>/sites/all/modules/civicrm/packages:.:/usr/share/php') in <civicrm_root_path>/sites/default/civicrm.settings.php on line 280" while reading response header from upstream [...]"  
  > **username_0**: With <civicrm_old_root_path> being the root path on the previous server, so it must be cached somewhere, but I cannot find where... (sorry for the answer in 3 comments, I hit the character limit)  
  > **username_1**: Did you try this?   1) Comment following lines in civicrm.settings.php :  require_once 'CRM/Core/ClassLoader.php'; CRM_Core_ClassLoader::singleton()->register();  2) Take backup of variable table in database & delete the row with name = 'civicrm_class_loader'.  3) With this your civicrm page should get loaded.  4) Now clear civicrm caches or hit "http://your_site/civicrm/menu/rebuild?reset=1" url.  5) Uncomment the above lines.  this answer: (https://civicrm.stackexchange.com/a/14840/5649)  
  > **username_0**: I tried it and it didn't work, I still have the errors.  
  > **username_2**: Seems this is an impossible scenario...;(  
  
  ---
  
  