[development] Loading configuration using 'SERVER_NAME' as opposed to 'HTTP_HOST'

Earnie Boyd earnie at users.sourceforge.net
Tue Mar 17 12:51:44 UTC 2009

Quoting Larry Garfield <larry at garfieldtech.com>:

> On Monday 16 March 2009 8:51:30 pm Sammy Spets wrote:
>> Using a symlink will result in modules, themes and files having an
>> incorrect path stored in the database. When you move the site live
>> you'll need to have your dev symlink in place for the site to function.
>> You could, of course, change all the entries in files and system tables
>> to reflect the change (along with any color module variables). Yuck...
>> too much work.
> The best solution is a backport of this D7 patch:
> http://drupal.org/node/231298
> I use it on most of my multi-sites. :-)

I think the better solution to this is to not store the 
files/whatever/file in the DB row and store only file.  The variables 
tell where the files are located so storing the path to the file in the 
row is a normalization issue.  I just moved a site from one host 
service to another and the location for the files changed.  Needless to 
say I had to update the user rows for the avatar's no less.  If the 
variables were used always to create the path and only the file name 
stored in the DB then moving the files directory should have been a 
simple change to the configuration.  I don't have time to work on a 
patch for this idea at the moment but I do have it on my round tuit 

Earnie  http://r-feed.com
  Make a Drupal difference and review core patches.

-- http://for-my-kids.com/  -- http://www.4offer.biz/

More information about the development mailing list