The latest Drupal from CVS (4.6.0) offers multisite configuration files, but currently the conf_init function in includes/bootstrap.inc will also include the :portnum URL specification in the directory name, which does not seem right (and the colon character may cause problems on Mac/Windows).
Snippet from bootstrap.inc:
* Example for a fictitious site installed at
* http://www.drupal.org/mysite/test/ the 'settings.php' is
* searched in the following directories:
.....
If the site is: http://www.drupal.org:8080/mysite/test/
the same list of directories should be searched as listed in the example in the file, and the :8080 should not be added to the directory name (I think...)
I don't know enough PHP to submit a patch, but this is probably easy for those who know this stuff :-)
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | _19934 | 2.14 KB | morbus iff |
| #11 | ports.patch | 2.14 KB | Uwe Hermann |
| #10 | _ports_0.patch | 2.25 KB | morbus iff |
| #8 | _ports.patch | 2.25 KB | morbus iff |
| #3 | conf_init_ports_0.patch | 1.35 KB | chx |
Comments
Comment #1
chx commentedHere you are.
Comment #2
dries commentedWon't commit. Removing the port seems like a bad idea (I could have two drupal sites at two different ports but otherwise identical URLs) and adding regex' all over the map isn't advised. If ":" is an invalid character, then there might be more such characters. I suggest we replace them with '.' and that we document this behavior much like we do with $db_url.
Comment #3
chx commentedComment #4
bwooster47 commentedRegarding update #3 - does this mean the code has made it in, and will be available in the next release?
Secondly: I follow the logic for the update, and it makes sense for non-standard HTTP port numbers, but not sure if the logic is valid when port 80 is used.
For example, http://yourdomain.com/ and http://yourdomain.com:80/ both will go to the exact same page, but looks like the search for the conf.php will be different.
Not sure if this matters...
Comment #5
killes@www.drop.org commentedpatch still applies, my testsite kept working (is not on a non-standard port, though).
Comment #6
dries commentedI think the PHPdoc is confusing. The second example URL is non-existing/invalid. Did you meant showing a configuration file?
I agree with bwooster that this gets tricky with the default port '80'. Do we need to discuss this some more?
Comment #7
boris mann commentedI like the period (".") character as the delimiter for ports.
If people really do tack on :80, then site admins can symlink domain.com.80 to domain.com (much as you would need to symlink www.domain.com to domain.com as well).
I think this is largely a documentation issue.
Comment #8
morbus iff+1. This patch is absolutely required for my home development, which is behind an ISP that doesn't like webservers on port 80. I've attached a new patch that fixes the doc mistake from the last patch, as well as adds a note to the INSTALL.txt too. I'm with Boris on the :80 issue - if a developer is using it knowingly, he should be smart enough to put 2 and 2 together.
Comment #9
morbus iffComment #10
morbus iffGrr. Parens in the wrong place. Right patch attached.
Comment #11
Uwe Hermann commentedPatch didn't apply anymore. Updated. I didn't test it, but +1 for the idea.
Comment #12
morbus iffConfirmed the updated patch.
Comment #13
dries commentedThe added documentation -- and the example in particular -- is confusing. At least to me. What do you mean with 'loaded from [some-weird-directory-path-that-I-don't-understand]'?
Comment #14
morbus iffThe patch looks confusing because the context is missing - the added block goes right beneath a bunch of existing examples of configuration paths, as well as an explanation.
Comment #15
dries commentedEven in the right context, it is confusing. AFAIK,
sites/www.drupal.org.8080/mysite/test/is never a valid configuration directory.Comment #16
morbus iffGah! No wonder. Those should be dots, not slashes. Revised patch attached.
Comment #17
dries commentedCommitted to HEAD.
Comment #18
(not verified) commented