[dev] Re: Horde webroot detection fails here

Jan Schneider jan at horde.org
Sun Feb 13 04:22:55 PST 2005


Zitat von Aurelien Bompard <gauret at free.fr>:

> Hi all,
>
> At the top of the config/registry.php, there is a line to detect the web
> root :
> $webroot = strstr(dirname(__FILE__), '/' . array_shift(preg_split(';/;',
> $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY)));
>
> This function fails here because I have installed Horde in
> "/home/horde/htdocs/horde". The detected webroot is "/horde/htdocs/horde"
> instead of "/horde".
> The best solution (I can think of) would be to search for "horde" from the
> end of the string, but there is no function in php to do that before PHP5.
> However, this page: http://www.php.net/manual/function.strrpos.php
> contains many user comments proposing such a function.
>
> Could one of them be added to registry.php ?

No. registry.php is a configuration file. If the webroot detection 
doesn't work for you, set it to a value that does.

Jan.

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


More information about the dev mailing list