Item10069: Web extension installer mis-locates Foswiki root if scripts in cgi-bin
Priority: Urgent
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
If Foswiki is installed with an alternate directory structure, the web extension installer mis-locates the Foswiki root
/ver/www/
.. cgi-bin
.. htdocs
.. data
.. lib
.. pub
The shell installer when run from "htdocs' works correctly. however the web-based installer executed under the control of
cgi-bin/configure
and creates a new bin and lib directory beneath
/var/www
The issue appears to be that root is assumed to be one level up from the script directory. This is set in
lib/Foswiki/Configure/UI.pm
--
GeorgeClark - 24 Nov 2010
In order to fix this I need a stable definition of $Foswiki::foswikiLibPath. The global is inconsistent. Adding
package Foswiki;
to setlib.cfg to get a consistent global declaration, and changing references to consistently use $Foswiki::foswikiLibPath
Also fixing a small issue with Util::mapTarget. Matching on /bin scripts missed scripts named with multi-word names, such as foswiki.fcgi
--
GeorgeClark - 24 Nov 2010
Even with fixing lib to map to $Foswiki::foswikiLibPath, any other unknown directories distributed by an extension will be placed into a directory one level up from the "bin" directory. This is incorrect on many installations.
After some IRC discussion, the Foswiki root (for installing extensions) should be one-level-up from {dataDir} or {toolsDir}. {pubDir} is possibly located in a webroot, $Foswiki::foswikiLibDir might be relocated into perl, and bin might be in cgi-bin above the webroot.
--
GeorgeClark - 25 Nov 2010