I'm trying to help a co-worker configure a Drupal site so that we can deploy the same site upstream without making database changes. We're having trouble with file paths. Here's what I have:

  1. A Nginx webroot pointing to the root of my Drupal 7 (in this case) install (/opt/frameworks/drupal-7).
  2. The content for this site is in /opt/www/my-site.
  3. A symlink exists in /opt/frameworks/drupal-7/sites: dev-my-site -> /opt/www/dev-my-site

Because of some sharing that's going on, there are multiple versions of my-site on the box, so they have to have different symlink names. Right now, the "file system path" is set to sites/dev-my-site/files which breaks when moved upstream.

We're both inexperienced with Drupal and trying to help out a client. Upstream we get this:

Fatal error: require_once() [function.require]: Failed opening required '/opt/frameworks/drupal-7.15/sites/www.productionurl.com/modules/entity/includes/entity.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /opt/frameworks/drupal-7.15/includes/bootstrap.inc on line 3084

At each point in the deployment process (dev, staging, production), the path will be slightly different. For example, .../sites/dev.myclient.com/modules/..., .../sites/stg.myclient.com/modules/... and .../sites/myclient.com/modules/.... When I deploy, what do I need to change to ensure that this works?

In Drupal 6, I was able to set the file_directory_path variable in settings.php, but that doesn't seem to be an option in Drupal 7. What's the alternative? Is there one?

  • did u use any dev version module?
    – monymirza
    Dec 13 '12 at 5:04
  • @monymirza - No. Nothing like that here. Dec 13 '12 at 16:57

This might be just a shorthand difference, but the include is looking for /drupal-7.15/ but you mention /drupal-7/ earlier in the post. Do you have two different versions of Drupal installed somehow, or is this all deployed from the same duplicate codebase and you're just trying to switch directories depending on the env?

  • Sorry, drupal-7 is a symlink to drupal-7.15. Keeping things tidy. :-) Dec 13 '12 at 16:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.