[Tickets #4126] Re: Make registry.php webroot path detection more reliable

bugs at bugs.horde.org bugs at bugs.horde.org
Mon Aug 6 15:35:39 UTC 2007


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

Ticket URL: http://bugs.horde.org/ticket/?id=4126
-----------------------------------------------------------------------
 Ticket             | 4126
 Updated By         | joelytaylor at comcast.net
 Summary            | Make registry.php webroot path detection more reliable
 Queue              | Horde Base
 Version            | HEAD
 Type               | Enhancement
 State              | Resolved
 Priority           | 1. Low
 Owners             | Jan Schneider
-----------------------------------------------------------------------


joelytaylor at comcast.net (2007-08-06 08:35) wrote:

I'm still unable to comprehend what I am supposed to do here.  This is what
the beginning of my /horde/config/registry.php file looks like.  I get the
URL trying to duplicate itself
(/horde/kronolith/month.php/horde/kronolith/month.php) on any add/update
within Turba & Kronolith.  These are the 2 apps that we utilize within the
groupware.  Server is running PHP4 as CGI. Can anyone tell me what to
change in here to get this corrected?  Sorry for my ignorance on this, but
I simply don't know much about this stuff and what to do with those files
attached above.  Thank you for anyone that can help me.
Joely

if (isset($_SERVER['PHP_SELF'])) {
    $webroot = preg_split(';/;', $_SERVER['PHP_SELF'], 2,
PREG_SPLIT_NO_EMPTY);
    $webroot = strstr(dirname(__FILE__), DIRECTORY_SEPARATOR .
array_shift($webroot));
    if ($webroot !== false) {
        $webroot = preg_replace(array('/\\\\/', ';/config$;'), array('/',
''), $webroot);
    } elseif ($webroot === false) {
        $webroot = '';
    } else {
        $webroot = '/horde';
    }
} else {
    $webroot = '/horde';
}

$this->applications['horde'] = array(
    'fileroot' => dirname(__FILE__) . '/..',
    'webroot' => $webroot,
    'initial_page' => 'login.php',
    'name' => _("Horde"),
    'status' => 'active',
    'templates' => dirname(__FILE__) . '/../templates',
    'provides' => 'horde'
);



More information about the bugs mailing list