[Tickets #5751] Modified _detect_webroot() to overcome installation issues

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Sep 27 15:12:57 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5751
-----------------------------------------------------------------------
 Ticket             | 5751
 Created By         | todd at magnifisites.com
 Summary            | Modified _detect_webroot() to overcome installation issues
 Queue              | Horde Framework Packages
 Version            | HEAD
 Type               | Enhancement
 State              | New
 Priority           | 1. Low
 Owners             | 
+New Attachment     | registry.php.patch
-----------------------------------------------------------------------


todd at magnifisites.com (2007-09-27 08:12) wrote:

Although the initial issue discovery was on a Windows install, I discovered
another issue that impacts ANY installation.

I was having difficulty with my initial installation of Horde on a local
Windows laptop.  I discovered that the /config/registry.php
_detect_webroot() function was causing my issues.  I modified the function
to use DIRECTORY_SEPARATOR to overcome the Windows-specific issue mentioned
in the base comment.  The patch will fix Windows issues and work just fine
in *nix installations.

One other thing I noted was that the existing code structure did not
handle multiple directory levels deep for ANY installation, not just
Windows.  I know it is highly improbable, but an installation to a
directory structure such as

 
/root/path/to/document_root/path/to/horde/horde/horde/config/registry.php

will incorrectly set the $web_root variable in the function as it exists
today.  I discovered this when I created my VirtualHost DOCUMENT_ROOT
directory as 'horde' and then extracted the horde application into a
subdirectory of the same name within the 'horde' DOCUMENT_ROOT directory. 
The modifications I made address this issue as well.

Lastly, the final modification will also allow a user to install horde
directly into the DOCUMENT_ROOT if they so desire.  If for some odd reason
they are opposed to creating a 'horde' directory within the DOCUMENT_ROOT
and extract the package directly into their DOCUMENT_ROOT directory, the
logic in the new _detect_webroot() function will allow such an install.  Of
course, the configuration cookie path must also be set correctly ...

  $conf['cookie']['path'] = '/';

Hopefully I have selected the correct queue and prepared the patch
correctly --
Todd



More information about the bugs mailing list