[Tickets #2505] RESOLVED: Horde's use of PHP_SELF to determine "webroot" creates problems with symlinked directories

bugs@bugs.horde.org bugs at bugs.horde.org
Thu Aug 25 05:21:04 PDT 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=2505
-----------------------------------------------------------------------
 Ticket             | 2505
 Updated By         | nick.maynard at alumni.doc.ic.ac.uk
 Summary            | Horde's use of PHP_SELF to determine "webroot" creates problems with symlinked directories
 Queue              | Horde Framework Packages
 Version            | FRAMEWORK_3
 State              | Bogus
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


nick.maynard at alumni.doc.ic.ac.uk (2005-08-25 05:21) wrote:

Hello Jan,

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




More information about the bugs mailing list