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

Jan Schneider jan at horde.org
Tue Aug 30 08:04:43 PDT 2005



----- Weitergeleitete Nachricht von nick.maynard at alumni.doc.ic.ac.uk -----
     Datum: Tue, 30 Aug 2005 15:48:10 +0100
       Von: Nick Maynard <nick.maynard at alumni.doc.ic.ac.uk>
Antwort an: Nick Maynard <nick.maynard at alumni.doc.ic.ac.uk>
   Betreff: [Fwd: [Tickets #2505] RESOLVED: Horde's use of PHP_SELF to 
determine "webroot" creates problems with symlinked directories]
        An: jan at horde.org

FYI - not sure you saw the original update to the bug.

Thanks,
Nick

-------- Original Message --------
Subject: [Tickets #2505] RESOLVED: Horde's use of PHP_SELF to determine 
"webroot" creates problems with symlinked directories
Date: Thu, 25 Aug 2005 05:21:04 -0700 (PDT)
From: bugs at bugs.horde.org
To: bugs at lists.horde.org

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



-- 

Nick Maynard
nick.maynard at alumni.doc.ic.ac.uk
http://www.fluffybrain.com



----- Ende der weitergeleiteten Nachricht -----


Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/


More information about the horde mailing list