[drupal-devel] subsite - sharing codebase - doesn't work as expected
Is it just me? Drupal doesn't seem to be picking up 'settings.php' files for subdirectories... I hadn't really used the multiple 'settings.php' ability, so I thought I would give it a test out by trying to set up a main drupal site, with a subsite that shared the Drupal codebase, (and the database tables for sharing users). This didn't work as expected. In fact Drupal did not want to recognise a 'settings.php' file for a subdirectory of the main site. My test is here: http://drupal-test.rosskendall.com/ (plain CVS install - done today) which uses 'sites/drupal-test.rosskendall.com/settings.php' However, when I create this settings file: 'sites/drupal-test.rosskendall.com.subsite2/settings.php' in an attempt to create a separate Drupal site that uses the same codebase, here: http://drupal-test.rosskendall.com/subsite2/ ...it does not even recognise the settings file. Obviously I'm not very familiar with this feature, but I do suspect that something is broken, because it does not do 'what it says on the can'. Any insights? Or can anyone confirm this is not working as it should? Cheers, Ross.
I suggest that this mail belongs in as a bug report, or support request. In other words, not drupal-devel. On Mar 15, 2005, at 8:05 PM, Ross Kendall wrote:
Is it just me?
Drupal doesn't seem to be picking up 'settings.php' files for subdirectories...
I hadn't really used the multiple 'settings.php' ability, so I thought I would give it a test out by trying to set up a main drupal site, with a subsite that shared the Drupal codebase, (and the database tables for sharing users).
This didn't work as expected. In fact Drupal did not want to recognise a 'settings.php' file for a subdirectory of the main site.
My test is here: http://drupal-test.rosskendall.com/ (plain CVS install - done today) which uses 'sites/drupal-test.rosskendall.com/settings.php'
However, when I create this settings file: 'sites/drupal-test.rosskendall.com.subsite2/settings.php' in an attempt to create a separate Drupal site that uses the same codebase, here: http://drupal-test.rosskendall.com/subsite2/ ...it does not even recognise the settings file.
Obviously I'm not very familiar with this feature, but I do suspect that something is broken, because it does not do 'what it says on the can'.
Any insights? Or can anyone confirm this is not working as it should?
Cheers, Ross.
Ross Kendall wrote:
Drupal doesn't seem to be picking up 'settings.php' files for subdirectories...
Ross, I had a similar problem and killes helped me fix it here: http://drupal.org/node/18812 -- Regards, Brian Hay.
Cheers Brian, I guess there is a small problem with Drupal then, and it's not just me. Adding a symbolic link to the codebase for a subdir isn't a solution for people who might use windows - I don't see why it should be needed - and I didn't see mention of adding a symbolic link in the docs. Has anyone else successfully set up a subdir 'subsite' - without a symbolic link to the codebase? Or is it an issue that Brian and I have with our hosting setup? Brian Hay wrote:
Ross Kendall wrote:
Drupal doesn't seem to be picking up 'settings.php' files for subdirectories...
Ross, I had a similar problem and killes helped me fix it here: http://drupal.org/node/18812
Ross Kendall wrote:
Adding a symbolic link to the codebase for a subdir isn't a solution for people who might use windows - I don't see why it should be needed - and I didn't see mention of adding a symbolic link in the docs.
Spoke too soon, there _is_ mention of symbolic links here: http://drupal.org/node/275 where it describes the 'old' method - with includes/conf.php OK I'll shut up now.
Ross Kendall wrote:
Adding a symbolic link to the codebase for a subdir isn't a solution for people who might use windows - I don't see why it should be needed - and I didn't see mention of adding a symbolic link in the docs.
NTFS supports symlinks, or 'junctions' to use the Windows term. http://www.sysinternals.com/ntw2k/source/misc.shtml#junction Torgeir
On 16 Mar 2005, at 03:55, Brian Hay wrote:
Ross Kendall wrote:
Drupal doesn't seem to be picking up 'settings.php' files for subdirectories...
Ross, I had a similar problem and killes helped me fix it here: http://drupal.org/node/18812
I can't read that post right now (I'm on the train) but if this is a recurring question, we might want to document this better (now we are improving the INSTALL.txt/settings.php). *looks at Morbus and Tom* -- Dries Buytaert :: http://www.buytaert.net/
Drupal doesn't seem to be picking up 'settings.php' files for subdirectories...
I can't read that post right now (I'm on the train) but if this is a recurring question, we might want to document this better (now we are improving the INSTALL.txt/settings.php).
*looks at Morbus and Tom*
How about: If you want a separate Drupal installation under a subdirectory (such as www.example.com/site3), it's important that the subdirectory exists and refers back to the primary location of your Drupal install. For example, if your primary installation is located in the directory 'www.example.com', then the following shell command run in the 'www.example.com' directory would create a symlink for 'site3': ln -s . site3 There's no Windows related text here (re: junctions) primarily because we caution the user at the beginning of the file that, in essence, "good luck with Windows configurations, bub." If the above looks fine, let me know. I profess to not knowing enough about multisites or symlinks /in detail and confidence/, so I'm requesting feedback before patching. -- Morbus Iff ( you are nothing without your robot car, NOTHING! ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
Morbus Iff wrote:
How about:
If you want a separate Drupal installation under a subdirectory (such as www.example.com/site3), it's important that the subdirectory exists and refers back to the primary location of your Drupal install. For example, if your primary installation is located in the directory 'www.example.com', then the following shell command run in the 'www.example.com' directory would create a symlink for 'site3':
ln -s . site3
It would be good to be consistent with terms, so maybe 'document root' should be used when refering to 'the directory'.
If you want a separate Drupal installation under a subdirectory (such as www.example.com/site3), it's important that the subdirectory exists and refers back to the primary location of your Drupal install. For example, if your primary installation is located in the directory 'www.example.com', then the following shell command run in the 'www.example.com' directory would create a symlink for 'site3':
ln -s . site3
It would be good to be consistent with terms, so maybe 'document root' should be used when refering to 'the directory'.
I worry about this. "DocumentRoot" is the name of an Apache directive. The only other place we mention some fort of that in the INSTALL.txt is: This will create a new directory drupal-x.x.x/ containing all Drupal files and directories. Move the contents of that directory into a directory within your web server's document root or your public HTML directory: In this paragraph, "document root" == "Apache DocumentRoot". It does not necessarily equate to "Drupal installation directory" or even a "public HTML directory." Using "document root" would confuse issues, as "Drupal installation directory" doesn't NECESSARILY equate to the "document root" phrase we, or Apache, has already established. -- Morbus Iff ( you are nothing without your robot car, NOTHING! ) Culture: http://www.disobey.com/ and http://www.gamegrene.com/ Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus
I beg you to please move discussions like this to the drupal-docs list. We are try to do some *development* here :) -moshe Morbus Iff wrote:
If you want a separate Drupal installation under a subdirectory (such as www.example.com/site3), it's important that the subdirectory exists and refers back to the primary location of your Drupal install. For example, if your primary installation is located in the directory 'www.example.com', then the following shell command run in the 'www.example.com' directory would create a symlink for 'site3':
ln -s . site3
It would be good to be consistent with terms, so maybe
'document root' should be used when refering to 'the directory'.
I worry about this. "DocumentRoot" is the name of an Apache directive. The only other place we mention some fort of that in the INSTALL.txt is:
This will create a new directory drupal-x.x.x/ containing all Drupal files and directories. Move the contents of that directory into a directory within your web server's document root or your public HTML directory:
In this paragraph, "document root" == "Apache DocumentRoot". It does not necessarily equate to "Drupal installation directory" or even a "public HTML directory."
Using "document root" would confuse issues, as "Drupal installation directory" doesn't NECESSARILY equate to the "document root" phrase we, or Apache, has already established.
participants (6)
-
Brian Hay -
Dries Buytaert -
Morbus Iff -
Moshe Weitzman -
Ross Kendall -
Torgeir Berg