This question about Installation of Foswiki: Answered
Good afternoon all,
I am currently in the process of moving a
FosWiki installation from Windows to Linux (Unbuntu Version 22.04.3 LTS)
This is using Apache 2.4.
After installation of Apache,
FosWIki, and its required dependencies, I am greated with the following when the Webpage is visited.
**** ERROR ****
The following critical dependencies are missing from your installation:
... CGI::Session:
Please install these modules and then ensure all dependencies are installed by either:
- viewing the System.PerlDependencyReport in your local Foswki, or
- running the CLI shell script tools/dependencies from your server's command line.
You can get a complete list of Perl module dependencies by viewing System.SystemRequirements
on your local system or at http://foswiki.org/System/SystemRequirements.
Foswiki will not operate correctly unless the required dependencies are installed.
Your current library search path @INC contains:
/var/www/foswiki/lib
/etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.34.0
/usr/local/share/perl/5.34.0
/usr/lib/x86_64-linux-gnu/perl5/5.34
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl-base
/usr/lib/x86_64-linux-gnu/perl/5.34
/usr/share/perl/5.34
/usr/local/lib/site_perl
/var/www/foswiki/lib/CPAN/lib
You can adjust the search path by editing bin/LocalLib.cfg
I am a little lost on what to do now, as I know CGi and CGI::Session are installed, both are installed in
/usr/local/share/perl/5.34.0
Also, CGI::Session does not appear if I run the dependencies script in tools.
Any assistance would be greatly appreciated.
Regards,
Mike
--
MichaelWillans - 26 Oct 2023
This can be closed, the root cause was the Session folder had no permissions for Other, giving the Sessions folder the same permissions as CGI resolved the issue.
When I ran perl -e "use CGI::Session" this was done as su, it failed as a regular user.
--
MichaelWillans - 26 Oct 2023
I'd recommend creating an app user, or giving www-data a shell (read up on headless user accounts with ssh key access but no password access).
From that user install its own Perl via perlbrew, and using cpanm (installed via perlbrew) for modules. The Perl install (5.38.2 appears to resolve issues with XML::Easy) will be
In the FCGI config, ensure the two perlbrew paths are passed, and that the FCGI bin is called via the Perl install path (it'll be in the app user home).
It gives the most robust install, with no accidental overlap or issues with modules, no permission issues, and ensures you can use the best version of Perl for Foswiki, meanwhile the Debian/Ubuntu distro version is there for all of the Debian tools that are built with Perl. When you do an OS update in the future, you'll loose all of your Perl modules, and will have to reinstall them again. If you have an isolated install using perlbrew, this won't happen, plus it has inbuilt tools for syncing your modules between diff versions of Perl.
--
JonMcCoy - 09 Mar 2024