Tags:
create new tag
view all tags

Question

TWiki is not finding my CGI::Session module but I installed.

I was evaluating some wiki engines to power our knowledge base at the company. I was reading about wikis at Wikipedia and I decided to choose a structured wiki. Since the two engines available are JotSpot and TWiki and JotSpot has no sign of life since it was acquired by Google (also see their blog at http://blog.jot.com/), I installed TWiki on a Sun Ultra 250 running Solaris 9.

To install you simply unpack the .tar.gz file in Apache's and run the /bin/configure in your browser. I'm still having some problems with TWiki.

My Apache's log file is showing that TWiki is not finding the Session CPAN module. I downloaded and compiled the module as showed in http://twiki.org/cgi-bin/view/TWiki/HowToInstallCpanModules

[root@hostname]/var/apache/logs # tail error_log [Mon Jul 30 08:58:00 2007] [error] [client 148.91.124.241] Premature end of script headers: /var/apache/htdocs/bin/view Can't locate CGI/Session.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.8/CGI /var/apache/htdocs/lib/CPAN/lib/arch /var/apache/htdocs/lib/CPAN/lib/5.8.8/sun4-solaris /var/apache/htdocs/lib/CPAN/lib/5.8.8 /var/apache/htdocs/lib/CPAN/lib /var/apache/htdocs/lib . /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl) at (eval 13) line 1. BEGIN failed--compilation aborted at (eval 13) line 1. [Mon Jul 30 08:58:09 2007] [error] [client 148.91.124.241] Premature end of script headers: /var/apache/htdocs/bin/view Can't locate CGI/Session.pm in @INC (@INC contains: /var/apache/htdocs/lib/CPAN/lib/arch /var/apache/htdocs/lib/CPAN/lib/5.8.8/sun4-solaris /var/apache/htdocs/lib/CPAN/lib/5.8.8 /var/apache/htdocs/lib/CPAN/lib /var/apache/htdocs/lib . /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl) at (eval 13) line 1. BEGIN failed--compilation aborted at (eval 13) line 1. [Mon Jul 30 11:10:35 2007] [error] [client 148.91.124.241] Premature end of script headers: /var/apache/htdocs/bin/view Can't locate CGI/Session.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto /var/apache/htdocs/lib/CPAN/lib/arch /var/apache/htdocs/lib/CPAN/lib/5.8.8/sun4-solaris /var/apache/htdocs/lib/CPAN/lib/5.8.8 /var/apache/htdocs/lib/CPAN/lib /var/apache/htdocs/lib . /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl) at (eval 13) line 1. BEGIN failed--compilation aborted at (eval 13) line 1. [Mon Jul 30 11:12:28 2007] [error] [client 148.91.124.241] Premature end of script headers: /var/apache/htdocs/bin/view

The error is that TWiki is not using the @localPerlLibPath, where I believe that I'm pointing to the right directory.

[root@hostname]/var/apache/htdocs/bin # cat LocalLib.cfg

# TWiki Enterprise Collaboration Platform, http://TWiki.org/ #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version. For
# more details read LICENSE in the root of this distribution. #
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #
# LocalLib.cfg: local path settings for TWiki

use vars qw( $twikiLibPath $CPANBASE );

# -------------- Path to lib directory containing TWiki.pm. #
# REQUIRED # The absolute path to the 'lib' directory in your installation..

$twikiLibPath = "/var/apache/htdocs/lib";

# -------------- Extra path components to include in @INC
# OPTIONAL # If you need to use perl modules that are not installed in the standard # directories (e.g. you have downloaded extra modules for use with plugins) # then you can add the absolute paths to those modules below. You can list # as many directories as you want, separated by commas.

# @localPerlLibPath = ( '/path/to/dir' );

@localPerlLibPath = ( '/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto');

#It was used other locations, see a list below
# http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=3 has good advice # on installing CPAN modules without superuser privileges.

1; # Required for successful module loading

The files are already in the directory.
[root@hostname]/usr/local/lib/perl5/site_perl/5.8.8 # ls -lR
.: total 6
drwxr-x--- 3 root other 512 Jul 28 14:45 auto
drwxr-x--- 3 root other 512 Jul 28 14:45 CGI
drwxr-xr-x 3 root bin 512 Jul 28 14:45 sun4-solaris

./auto: total 2
drwxr-x--- 3 root other 512 Jul 28 14:45 CGI

./auto/CGI: total 2
drwxr-x--- 2 root other 512 Jul 28 14:45 Session

./auto/CGI/Session: total 52
-r--r--r-- 1 root other 476 Jul 28 14:43 atime.al
-r--r--r-- 1 root other 414 Jul 28 14:43 autosplit.ix
-r--r--r-- 1 root other 1079 Jul 28 14:43 clear.al
-r--r--r-- 1 root other 403 Jul 28 14:43 close.al
-r--r--r-- 1 root other 472 Jul 28 14:43 ctime.al
-r--r--r-- 1 root other 497 Jul 28 14:43 delete.al
-r--r--r-- 1 root other 1060 Jul 28 14:43 dump.al
-r--r--r-- 1 root other 429 Jul 28 14:43 error.al
-r--r--r-- 1 root other 372 Jul 28 14:43 errstr.al
-r--r--r-- 1 root other 1097 Jul 28 14:43 expire.al
-r--r--r-- 1 root other 373 Jul 28 14:43 expires.al
-r--r--r-- 1 root other 698 Jul 28 14:43 header.al
-r--r--r-- 1 root other 431 Jul 28 14:43 is_new.al
-r--r--r-- 1 root other 1085 Jul 28 14:43 load_param.al
-r--r--r-- 1 root other 484 Jul 28 14:43 name.al
-r--r--r-- 1 root other 425 Jul 28 14:43 param_hashref.al
-r--r--r-- 1 root other 431 Jul 28 14:43 remote_addr.al
-r--r--r-- 1 root other 1452 Jul 28 14:43 save_param.al
-r--r--r-- 1 root other 829 Jul 28 14:43 sync_param.al
-r--r--r-- 1 root other 881 Jul 28 14:43 _time_alias.al
-r--r--r-- 1 root other 436 Jul 28 14:43 version.al

./CGI: total 66
drwxr-x--- 4 root other 512 Jul 28 14:45 Session
-r--r--r-- 1 root other 32280 Jul 26 2003 Session.pm

./CGI/Session: total 168
-r--r--r-- 1 root other 2142 Nov 27 2002 BluePrint.pm
-r--r--r-- 1 root other 22106 Jul 26 2003 CookBook.pm
-r--r--r-- 1 root other 3755 Jul 26 2003 DB_File.pm
-r--r--r-- 1 root other 4354 Mar 14 2003 Example.pm
-r--r--r-- 1 root other 4246 Jul 26 2003 File.pm
drwxr-x--- 2 root other 512 Jul 28 14:45 ID
-r--r--r-- 1 root other 5842 Jul 26 2003 MySQL.pm
-r--r--r-- 1 root other 6567 Jul 26 2003 PostgreSQL.pm
drwxr-x--- 2 root other 512 Jul 28 14:45 Serialize
-r--r--r-- 1 root other 29776 Jul 26 2003 Tutorial.pm

./CGI/Session/ID: total 16
-r--r--r-- 1 root other 3304 Nov 27 2002 Incr.pm
-r--r--r-- 1 root other 1783 Nov 27 2002 MD5.pm
-r--r--r-- 1 root other 1576 Mar 14 2003 SHA1.pm

./CGI/Session/Serialize: total 18
-r--r--r-- 1 root other 2584 Jul 26 2003 Default.pm
-r--r--r-- 1 root other 2057 Nov 27 2002 FreezeThaw.pm
-r--r--r-- 1 root other 2151 Nov 27 2002 Storable.pm

./sun4-solaris: total 2
drwxr-x--- 3 root other 512 Jul 28 14:45 auto

./sun4-solaris/auto: total 2
drwxr-x--- 3 root other 512 Jul 28 14:45 CGI

./sun4-solaris/auto/CGI: total 2
drwxr-x--- 2 root other 512 Jul 28 14:45 Session

./sun4-solaris/auto/CGI/Session: total 0

So my question is: which value should I put in my LocalLib.cfg?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Solaris 9
Web server: Apache 1.3
Perl version: 5.8.8
Client OS: MS Windows XP, service pack 2
Web Browser: Firefox
Categories: Platform, Fatal error, Deployment

-- EmersonTakahashi - 04 Aug 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Don't point @INC at the auto directory.

The easiest way to check what path is required is to:

perl -e 'use CGI::Session'

and add -I options to point to directories until it works. The -I options then indicate what should be in @localPerlLibPath.

-- CrawfordCurrie - 06 Aug 2007

I found the answer to my problem. Apache is running under the user nobody. I issued chown -R nobody:nobody in /usr/local/lib/perl5/site_perl/5.8.8 and it worked.

-- EmersonTakahashi - 10 Aug 2007

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-08-10 - EmersonTakahashi
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.