[drupal-devel] [bug] conf_init should strip out port numbers in bootstrap.inc

Dries drupal-devel at drupal.org
Mon Aug 1 05:32:00 UTC 2005


Issue status update for 
http://drupal.org/node/19934
Post a follow up: 
http://drupal.org/project/comments/add/19934

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     bug reports
 Priority:     normal
 Assigned to:  chx
 Reported by:  bwooster47
 Updated by:   Dries
-Status:       patch (ready to be committed)
+Status:       patch (code needs work)

I 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?




Dries



Previous comments:
------------------------------------------------------------------------

Sun, 03 Apr 2005 23:07:58 +0000 : bwooster47

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 :-)




------------------------------------------------------------------------

Fri, 08 Apr 2005 07:08:53 +0000 : chx

Attachment: http://drupal.org/files/issues/conf_init_ports.patch (768 bytes)

Here you are.




------------------------------------------------------------------------

Fri, 08 Apr 2005 11:16:52 +0000 : Dries

Won'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.




------------------------------------------------------------------------

Mon, 11 Apr 2005 23:25:51 +0000 : chx

Attachment: http://drupal.org/files/issues/conf_init_ports_0.patch (1.35 KB)




------------------------------------------------------------------------

Tue, 19 Apr 2005 17:03:46 +0000 : bwooster47

Regarding 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...




------------------------------------------------------------------------

Mon, 01 Aug 2005 01:23:28 +0000 : killes at www.drop.org

patch still applies, my testsite kept working (is not on a non-standard
port, though).







More information about the drupal-devel mailing list