Tags:
create new tag
view all tags

Question

I didn't find a previous posting that would lead me to a solution or additional debugging information therefore I have included an error message from configure for which I can't find a root cause.

TWiki module in @INC path Error: 'TWiki.pm' could not be loaded. The error was:
[Wed Apr  5 18:05:14 2006] configure: [Wed Apr  5 18:05:14 2006] configure: syntax error at /home/nsgtools/public_html/twiki/lib/TWiki.pm line 269, near "PubDir TemplateDir ScriptUrlPath LocalesDir )"
[Wed Apr  5 18:05:14 2006] configure: [Wed Apr  5 18:05:14 2006] configure:   (Might be a runaway multi-line () string starting on line 268)
[Wed Apr  5 18:05:14 2006] configure: [Wed Apr  5 18:05:14 2006] configure: BEGIN not safe after errors--compilation aborted at /home/nsgtools/public_html/twiki/lib/TWiki.pm line 274.

Error: Check path to twiki/lib and check that LocalSite.cfg is present and readable

I followed the suggestions but I don't see my mistake.

Environment

TWiki version: TWiki Release 4.0
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Solaris 2.8
Web server: Apache/1.3.26
Perl version: version 5.005_03 built for sun4-solaris
Client OS: MS Windows 2000 Professional
Web Browser: MS IE 6.0.2800.1106CO
Categories: Installation

-- TWikiGuest - 05 Apr 2006

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.

Please set the path to twiki/lib in twiki/bin/LocalLib.cfg (copy from LocalLib.cfg.txt)

-- PeterThoeny - 06 Apr 2006

Also copy twiki/lib/LocalSite.cfg.txt to twiki/lib/LocalSite.cfg, make sure it is writable by the webserver user, and try again.

-- PeterThoeny - 06 Apr 2006

Peter, I appreciate your response.

I already had most of the configuration you suggested in place, with exception to the LocalLib.cfg settings, which I had previously hard-coded in a modified version of setlib.cfg.

I restored the original (downloaded from twiki.org) version of setlib.cfg and moved the twiki lib configuration to LocalLib.cfg but I still see the identical errors.

-- TWikiGuest - 06 Apr 2006

Peter,

Here is some of the related detail:

whccsc!nsgtools.1: cp -p setlib.cfg_022106 setlib.cfg

/home/nsgtools/public_html/twiki/bin

whccsc!nsgtools.1: cp LocalLib.cfg.txt LocalLib.cfg    

/home/nsgtools/public_html/twiki/bin

whccsc!nsgtools.1: vi LocalLib.cfg
...
$twikiLibPath = "/home/nsgtools/public_html/twiki/lib";
...

whccsc!nsgtools.1: 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 = "/home/nsgtools/public_html/twiki/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' );

# http://www.perl.com/pub/a/2002/04/10/mod_perl.html?page=3 has good advice
# on installing CPAN modules without superuser privileges.


# -------------- Only needed to work around an Apache 2.0 bug on Unix
# OPTIONAL
# If you are running TWiki on Apache 2.0 on Unix you might experience
# TWiki scripts hanging forever. This is a known Apache 2.0 bug. A fix is 
# available at http://issues.apache.org/bugzilla/show_bug.cgi?id=22030.
# You are recommended to patch your Apache installation.
#
# As a workaround, uncomment ONE of the lines below. As a drawback,
# errors will not be reported to the browser via CGI::Carp any more.

# open(STDERR, ">>/dev/null");          # throw away cgi script errors, or
# open(STDERR, ">>/tmp/error.log"); # redirect errors to a log file


1; # Required for successful module loading


/home/nsgtools/public_html/twiki/bin

whccsc!nsgtools.1: diff LocalLib.cfg.txt LocalLib.cfg
22c22
< $twikiLibPath = "/absolute/path/to/your/lib";
---
> $twikiLibPath = "/home/nsgtools/public_html/twiki/lib";

/home/nsgtools/public_html/twiki/bin

whccsc!nsgtools.1: ls -l LocalLib.cfg
-rwxr-xr-x   1 nsgtools nsgtools    2061 Apr  6 17:03 LocalLib.cfg

/home/nsgtools/public_html/twiki/bin

whccsc!nsgtools.1: cd ../lib

/home/nsgtools/public_html/twiki/lib

whccsc!nsgtools.1: ls -l LocalSite.cfg
-rwxr-xr-x   1 nsgtools nsgtools    2189 Apr  6 16:33 LocalSite.cfg

/home/nsgtools/public_html/twiki/lib

whccsc!nsgtools.1: cat LocalSite.cfg
# Example site-specific configuration file for TWiki, held in 'lib' directory. 
#
# This is distributed as LocalSite.cfg.txt - if for some reason you can't,
# or don't want to, use =configure= to manage your site configuration, you can
# copy this file to LocalSite.cfg edit it manually.
#
# LocalSite.cfg overrides TWiki.cfg, so there is no risk of your settings 
# being overwritten when you upgrade.
#
# Only the most commonly used settings are listed in LocalSite.cfg.txt
# See TWiki.cfg to copy across the other (seldom changed) settings 
#
# Use 'LocalLib.cfg' in the 'bin' directory to configure non-standard
# locations for the 'lib' directory or Perl modules.
#

# NOTE: If your server is running Microsoft Windows, paths should
# normally be written as "c:/foo" not "c:\foo" (which doesn't do what
# you may think it does). You can use '\' without problems inside
# single quotes, e.g. 'c:\foo'.

# If LocalSite.cfg is used (and it _should_ be), then _all_ the
# following paths muct be defined.

# URL for TWiki host e.g. http://myhost.com:123
$cfg{DefaultUrlHost} = 'http://mobility.wh.lucent.com';

# cgi-bin URL path for TWiki e.g. /twiki/bin
$cfg{ScriptUrlPath} = '/~nsgtools/twiki/bin';

# Attachments URL path e.g. /twiki/pub
$cfg{PubUrlPath} = '/~nsgtools/twiki/pub';

# Attachments store file path (not URL), must match /twiki/pub e.g.
# /usr/local/twiki/pub
$cfg{PubDir} = '/home/nsgtools/public_html/twiki/pub';

# SECURITY NOTE: Directories =twiki/data= , =twiki/templates= and all their
# subdirectories should be set so that they are _not_ visible through
# URLs. (Alternatively, move the directories to a place where they are
# not visible, and set the paths here as appropriate)

# Template directory e.g. /usr/local/twiki/templates
$cfg{TemplateDir} = '/home/nsgtools/public_html/twiki/templates';

# Topic files store (file path not URL) e.g. /usr/local/twiki/data
# TWiki will use this path to base other defaults, such as the location
# of password files.
$cfg{DataDir} = '/home/nsgtools/public_html/twiki/data';

# TWiki.cfg will use this path to default where to put log files, unless
# you override individual paths here.
$cfg{LogDir} = $cfg{DataDir};

1;

/home/nsgtools/public_html/twiki/lib

-- TWikiGuest - 06 Apr 2006

The problem was a bad version of perl at /usr/bin on all our Sun distributed Solaris. Once I replaced the script references to a version that we maintain at /opt/exp/bin/perl, everything works as expected and the configure and testenv errors are not reported.

nsgtools: uname -a SunOS? whccsc 5.8 Generic_117350-30 sun4u sparc SUNW,Sun-Fire-V490 

nsgtools: /usr/bin/perl -version 

This is perl, version 5.005_03 built for sun4-solaris 

Copyright 1987-1999, Larry Wall 

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5.0 source kit. 

Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. 


nsgtools: /opt/exp/bin/perl -version 

This is perl, v5.6.1 built for sun4-solaris 

Copyright 1987-2001, Larry Wall 

Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. 

Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. 

-- TWikiGuest - 08 Apr 2006

Glad it worked out, closing now...

-- PeterThoeny - 02 Apr 2007

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2007-04-02 - PeterThoeny
 
  • 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.