I have copied a drupal codebase, drupal database, and civicrm database and moved them to a new server. I am using version 4.7.0 of civicrm. My copied site throws this error:

Error: Could not create directory: /home/abc. If you have moved an existing CiviCRM installation from one location or server to another there are several steps you will need to follow. They are detailed on this CiviCRM wiki page - (learn more...). A fix for the specific problem that caused this error message to be displayed is to set the value of the config_backend column in the civicrm_domain table to NULL. However we strongly recommend that you review and follow all the steps in that document.

This folder does not exist on my server, nor do I want it to. It is a reference to a location on the server from which I made the copy.

  • I have looked in civicrm_domain, config_backend does not exist
  • I have emptied all the cache tables in the civi database
  • I have emptied all the cache tables in the drupal database
  • I have updated settings.php ('home/abc' is not present anymore)
  • I have updated civicrm.settings.php ('home/abc' is not present anymore)
  • I have removed/removed all files from the following:

    1. /sites/default/files/civicrm/templates_c/*
    2. /sites/default/files/civicrm/ConfigAndLog/Config.IDS.ini
    3. /sites/default/files/civicrm/ConfigAndLog/*

When I run grep -R "/home/abc" * from my doc root, no matches are found. When I search for the string "/home/abc", in both databases, I get no matches.

Any ideas? Thanks.

  • check directory permissions, try chown -R www-data /site-driectory – Kboy Feb 27 '16 at 19:22
  • Clear your template directory and then check. – Prem Patel Feb 27 '16 at 20:40
  • Can you get as far as logging in and going to the following screens: civicrm/admin/setting/path and civicrm/admin/setting/updateConfigBackend There are several paths in there that may need to be changed. – DaveFF Feb 29 '16 at 17:30
  • No, a white screen with the error message described. – user2877 Feb 29 '16 at 17:31
  • Did you manage to search in your DB just for the "abc" folder as /home will be picked from the setting file – Ramesh - ARTECH Consultancy Mar 1 '16 at 9:38
  1. General tip: When I've had problems like this (a mysterious setting/value/datum), one other technique is to search the full database. There's no direct way to do that in MySQL, but you can dump the database to a file (mysqldump) and then search that.

  2. Specific tip: In the Civi database, check table civicrm_setting, e.g. select * from civicrm_setting where value like '%abc%'; Equivalently, in the admin UI, check Administer => System Settings => Directories (or its sibling => Resource URLs).

  3. Background: This may or may not be your problem, but as background/theory.

    • In v4.1-v4.6, directory+URL settings were stored as a mix of absolute and relative paths (but displayed as if they were always absolute paths). The problem is that absolute paths kinda suck -- they make the database less portable. Ideally, you want all the settings to be stored as relative paths.
    • In v4.7, the defaults and UI have changed to better encourage relative paths. The key thing is the introduction of path variables like [cms.root]. For example, the default directories in a new v4.7 installation look like http://imgur.com/RbMgyn6
    • v4.7 is backward-compatible with old settings. If you used an absolute path in v4.6 and upgraded, then it's still an absolute path.
    • If you cannot edit these things in the UI (because an error blocks it), then you can use SQL or drush cvapi setting.create. For v4.7, I'd suggest simply deleting the offending setting. (Deleted settings will go back to their defaults in 4.7.)
  • 1
    Step 2 worked for me. I found 5 references to the folder structure from the original server, in civicrm_setting. I was able to change 4 of the paths. Site now loading. Thanks. – user2877 Mar 1 '16 at 10:18

Prem's comment contains a good next step - delete the contents of your templates_c folder. The location in a standard Drupal install is /sites/default/files/civicrm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy