Summary | Horde's use of PHP_SELF to determine "webroot" creates problems with symlinked directories |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | |
Requester | nick.maynard (at) alumni (dot) doc (dot) ic (dot) ac (dot) uk |
Created | 08/24/2005 (7318 days ago) |
Due | |
Updated | 08/25/2005 (7317 days ago) |
Assigned | |
Resolved | 08/24/2005 (7318 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Where is this configuration option? I've found that in order to
manually set the webroot, I've had to comment out the auto-detection
section of registry.php and set the variable value again manually:
/*
if (isset($_SERVER['PHP_SELF'])) {
$webroot = strstr(dirname(__FILE__), '/' .
array_shift(preg_split(';/;', $_SERVER['PHP_SELF'], 2,
PREG_SPLIT_NO_EMPTY)));
if ($webroot !== false) {
$webroot = preg_replace(';/config$;', '', $webroot);
} else {
$webroot = '/horde';
}
} else {
$webroot = '/horde';
}
*/
$webroot = '/horde';
If I don't do the above, the PHP_SELF detection logic kicks in and
determines the wrong webroot.
Cheers,
Nick
State ⇒ Not A Bug
to configure Horde properly. If it would work in all cases, we
wouldn't make it a configuration option.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Horde's use of PHP_SELF to determine "webroot" creates problems with symlinked directories
Queue ⇒ Horde Framework Packages
My server setup uses the following:
horde-3.0 (real directory, where horde-3.0 lives)
horde->horde-3.0 (symlink)
This creates problems with the following:
- I direct my users to use /horde, and they are redirected to
/horde-3.0 by Horde
- My cookie path setting of "/horde" means that cookies can't be used
for sessions
Horde 2.x allowed admins to force the "webroot" setting, which
effectively bypassed this problem.
I notice that "webroot" is now derived from PHP_SELF - can we include
a configuration option that allows the admin to force this to any
value he wishes?
Cheers,
Nick