Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jan 2008 at 01:40 UTC
Updated:
3 Dec 2010 at 18:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
gaelicWizard commentedYes, please!
This would be _particularly_ useful for running out of a read-only drupal installation on, for example, a shared host.
Example hypothetical:
Shared Server 'shserv92'.
Drupal installed in /usr/web/cms/drupal/7.
Shared Hosting Subscriber 'shuser4231234'.
Per-user web root ~shuser4231234/public_html.
~shuser4231234/public_html/index.php specifies:
…
BUT, then Drupal would try to read it's configuration from DRUPAL_ROOT/sites!
Add to ~shuser4231234/public_html/index.php:
Then, Problem solved. This is more than multi-site, this is multi-conf.
For now, conf_path() needs to be hacked.
:-/
Comment #2
gaelicWizard commentedUpon further investigation, it appears that drupal_system_listing() would also need modification, since it hard-codes 'sites/all' and 'profiles'.
Comment #3
gaelicWizard commentedHere's my attempt at a patch.
Summary: (1) Change 'sites/all' to DRUPAL_CONFDIR . '/all', (2) change "profiles" to DRUPAL_ROOT . "/profiles".
There are two things which are missing/incomplete: (1) comments, (2) the location of the define() call.
Right now, I've placed the same new call to define() once _each_ in common.inc and bootstrap.inc, _inside_ conf_path() and drupal_system_listing(). This is certainly the wrong place. I think it should just go near the top of bootstrap.inc somewhere.
JP
Comment #4
gaelicWizard commentedComment #5
gaelicWizard commentedSlightly updated patch, now including install.core.inc. No other changes.
Comment #7
gaelicWizard commentedI'm not sure what that MySQL failure means…
¿install.core.inc -> install_check_requirements() -> $default_settings_file needs to be a relative path?
Comment #8
gaelicWizard commented¿Or, drupal_system_listing()'s $searchdir needs to be a relative path?
Comment #9
gaelicWizard commentedSo, I've figured out that file_scan_directory() returns paths which are expected to be relative to the web-server's DOCROOT. I'm not sure what to do about that. Perhaps strip the first several path components off (so that DRUPAL_CONFDIR is reduced to a single path component) _after_ the search completes (i.e. drupal_system_listing(), after file_scan_directory() returns), on the assumption that DRUPAL_CONFDIR is DOCROOT/something. That seems like a lot of work. Considering this is a search function, maybe the additional path-munging won't be significant.
Remember, I'm not just trying to rename 'sites'. I'm trying to move it to a different location on disk.
Also, updated patch removing changes to install.core.inc: default.settings.php _should_ be pulled from inside DRUPAL_ROOT, not from DRUPAL_CONFDIR.