NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

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

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Engine Configure  
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
 

ItemTemplate edit

Summary Web extension installer mis-locates Foswiki root if scripts in cgi-bin
ReportedBy GeorgeClark
Codebase
SVN Range
AppliesTo Engine
Component Configure
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:10056 Foswikirev:10060 Foswikirev:10062 Foswikirev:10063 Foswikirev:10090 Foswikirev:10091 Foswikirev:10110 Foswikirev:10113
TargetRelease patch
ReleasedIn 1.1.3
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 CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads