|CiviCRM 4.2.8 on Drupal 7.20 Multisite
||[Feb. 26th, 2013|12:51 am]
Carefully, Correctly Wrong
I've finally fixed a problem with installing CiviCRM 4.2.8 with Drupal 7.20.
I have a standard multisite Drupal setup, with the settings.php in
sites/mydomain/. I untarred the Civi module into
sites/all/modules/, ran the Civi installer and entered the database details for Drupal and Civi. The installer ran, and failed with this error:
You need to define CIVICRM_DSN in civicrm.settings.php
The other weirdness I noticed is that the Civi installer wanted write access to
sites/default/ rather than
sites/mydomain/. After a few blind alleys, I learned that the Civi installer was writing the civicrm.settings.php file to
sites/default/ and then failing to read it from
sites/mydomain/. The workaround was to create a symlink from
sites/default/civicrm.settings.php - this would be a broken symlink at first but the target would exist by the time the installer came to read it. Once the install is complete, you can move the Civi settings file out of default/ with no problems.
I'm told that if I'd put the Civi install in the mydomain-specific modules directory, this wouldn't have been a problem - but I might want other Civi sites under the same Drupal install, so it made sense put it under all/. I haven't tested that either way. I'll look for ways to submit this as a proper bug and workaround to CiviCRM eventually, but wanted to throw it up here in the hope it picks up search engine traction for others searching for that error message, as there was very little that helped me!