[dev] Fwd: [Tickets] New ticket (114): Horde relocatability
Jan Schneider
jan at horde.org
Sun Apr 25 00:58:48 PDT 2004
Zitat von Chuck Hagenbuch <chuck at horde.org>:
> What do folks think of this idea? Any objections, anyone see any
> problems with
> it?
Is DOCUMENT_ROOT defined on all web servers?
> ----- Forwarded message from bugs at bugs.horde.org -----
> Date: Fri, 23 Apr 2004 11:46:34 -0700 (PDT)
> From: bugs at bugs.horde.org
> Reply-To: bugs at bugs.horde.org
> Subject: [Tickets] New ticket (114): Horde relocatability
> To: bugs at lists.horde.org
>
> DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
>
> -Ticket 114
> -Queue: Horde Base
> -Created By:
>
> -Summary:
> Horde relocatability
>
> Comment by mike at nerone.org on Fri Apr 23 11:46:34 2004 (today):
> Currently, users are forced to edit registry.php when putting Horde in any
> hierarchy other than "/horde". The code already uses the "__FILE__" constant
> in other areas, and this can easily be used to remove this burden on users.
>
> An easy example of how useful this is is that it would allow someone to
> create a Horde-only site simply by setting the DocumentRoot to the horde
> directory. It also has the benefit of being trivially easy. My example below
> is a replacement for the horde stanza in registry.php. It only adds two
> lines and modifies three others. It works as-is, though a proper
> implementation would have a bit more sanity-checking, I should think. It
> should also look less kludgy, of course. :D
>
> ==========
> $webrootkludge = str_replace('/config/registry.php', '',
> str_replace($_SERVER['DOCUMENT_ROOT'], '', __FILE__));
> $webrootkludgecookie = $webrootkludge or $webrootkludgecookie = '/';
>
> $this->applications['horde'] = array(
> 'fileroot' => dirname(__FILE__) . '/..',
> 'webroot' => $webrootkludge,
> 'initial_page' => 'login.php',
> 'icon' => "$webrootkludge/graphics/home.gif",
> 'name' => _("Horde"),
> 'allow_guests' => true,
> 'status' => 'active',
> 'templates' => dirname(__FILE__) . '/../templates',
> 'cookie_domain' => $_SERVER['SERVER_NAME'],
> 'cookie_path' => $webrootkludgecookie,
> 'server_name' => $_SERVER['SERVER_NAME'],
> 'server_port' => $_SERVER['SERVER_PORT']
> );
> ==========
>
> The above is my change against 2.2.5 Final and that's what I posted this bug
> for, but my opinion is that it should be used for all future versions,
> unless, of course, this presents a specific problem. If that's the case,
> please enlighten me. I've actually tried to figure out why something so easy
> wasn't done already.
>
> --
>
>
> http://bugs.horde.org/details.php?id=114
>
> --
> This mail was automatically generated by Tickets (http://bugs.horde.org/).
>
> --
> You are subscribed to this list as: chuck at horde.org
> To unsubscribe, mail: bugs-unsubscribe at lists.horde.org
>
> ----- End forwarded message -----
>
>
> -chuck
>
> --
> "Regard my poor demoralized mule!" - Juan Valdez
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - Neue Wege des Lernens
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the dev
mailing list