Item10069: Web extension installer mis-locates Foswiki root if scripts in cgi-bin

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component: Configure
Branches:
Reported By: GeorgeClark
Waiting For:
Last Change By: KennethLavrsen
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
 
Topic revision: r13 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy