Tags:
create new tag
view all tags

Question

When I run the configure script from my browser, I get the following error in the CGI Setup section:


TWiki module in @INC path   
Error: 'TWiki.pm' could not be loaded. The error was:

Can't locate TWiki/Sandbox.pm in @INC (@INC contains: ../lib /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl5/TWiki.pm line 134.
BEGIN failed--compilation aborted at /usr/share/perl5/TWiki.pm line 134.
Compilation failed in require at (eval 47) line 3.

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

Here is an ls of my /usr/share/perl5/TWiki/ directory:

mccdebian01:/home/astewart# ls -la /usr/share/perl5/TWiki/
total 636
drw-rw-r-- 12 www-data www-data  4096 2006-04-21 05:21 .
drwxr-xr-x 26 root     root      4096 2006-04-25 05:57 ..
-rwxrw----  1 www-data www-data  2113 2006-04-21 04:46 AccessControlException.pm
-rwxrw----  1 www-data www-data  6393 2006-04-21 04:46 Access.pm
-rwxrw----  1 www-data www-data 21293 2006-04-21 04:46 Attach.pm
-rwxrw----  1 www-data www-data  8478 2006-04-21 04:46 Attrs.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Client
-rwxrw----  1 www-data www-data 22760 2006-04-21 04:46 Client.pm
-rwxrw----  1 www-data www-data  6130 2006-04-21 04:46 Compatibility.pm
drwxrw----  4 www-data www-data  4096 2006-04-21 04:46 Contrib
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Data
-rwxrw----  1 www-data www-data 24752 2006-04-21 04:46 Form.pm
-rwxrw----  1 www-data www-data 71431 2006-04-21 04:46 Func.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 I18N
-rwxrw----  1 www-data www-data 12339 2006-04-21 04:46 I18N.pm
-rwxrw----  1 www-data www-data  8612 2006-04-21 04:46 If.pm
-rwxrw----  1 www-data www-data 15495 2006-04-21 04:46 Merge.pm
-rwxrw----  1 www-data www-data 13989 2006-04-21 04:46 Meta.pm
-rwxrw----  1 www-data www-data  9331 2006-04-21 04:46 Net.pm
-rwxrw----  1 www-data www-data  2990 2006-04-21 04:46 OopsException.pm
-rwxrw----  1 www-data www-data  8673 2006-04-21 04:46 Plugin.pm
drwxrw---- 10 www-data www-data  4096 2006-04-21 04:46 Plugins
-rwxrw----  1 www-data www-data 21235 2006-04-21 04:46 Plugins.pm
-rwxrw----  1 www-data www-data  2831 2006-04-21 04:46 Plurals.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Prefs
-rwxrw----  1 www-data www-data  8609 2006-04-21 04:46 Prefs.pm
-rwxrw----  1 www-data www-data 66029 2006-04-21 04:46 Render.pm
-rwxrw----  1 www-data www-data 13049 2006-04-21 04:46 Sandbox.pm
-rwxrw----  1 www-data www-data 43126 2006-04-21 04:46 Search.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Store
-rwxrw----  1 www-data www-data 64356 2006-04-21 04:46 Store.pm
-rwxrw----  1 www-data www-data 12490 2006-04-21 04:46 Templates.pm
-rwxrw----  1 www-data www-data 13607 2006-04-21 04:46 Time.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 UI
-rwxrw----  1 www-data www-data  8334 2006-04-21 04:46 UI.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Upgrade
-rwxrw----  1 www-data www-data  2317 2006-04-21 04:46 Upgrade.pm
-rwxrw----  1 www-data www-data 11720 2006-04-21 04:46 User.pm
drwxrw----  2 www-data www-data  4096 2006-04-21 04:46 Users
-rwxrw----  1 www-data www-data 12992 2006-04-21 04:46 Users.pm

Environment

TWiki version: TWikiRelease04x00x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Debian Etch
Web server: Apache 2.0.55-4
Perl version: 5.8.8-3
Client OS: Debian Etch
Web Browser: Firefox 1.5.0.1
Categories: Installation

-- AndrewStewart - 25 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.

The obvious observation is that it is unlikely that your webserver runs as user "root", yet only user root has permission to read the code.

Use chown to change the ownership of the files to the webserver user.

-- CrawfordCurrie - 26 Apr 2006

WWW-data has permissions to read in the ls I posted above. Also, I changed ownership to www-data, and I still get the same erorr. (I'll post the updated ls above.)

-- AndrewStewart - 26 Apr 2006

I attached my configure output.

-- AndrewStewart - 26 Apr 2006

I changed the status to Asked. Please feel free to slap me if I was wrong to do this. I looked around the website and couldn't find a policy and when or when not to do this.

TWiki seems to be a great product, and I am really anxious to play around with it. But I am stuck right now.

-- AndrewStewart - 26 Apr 2006

I noticed a relative ../lib path, which can cause issues with modules loaded in a late stage. Configure TWiki to use an absolute path to the lib: Check that twiki/bin/LocalSite.cfg is present and readable by the webserver user.

-- PeterThoeny - 27 Apr 2006

Andrew, you go ahead and change the status all you like! This is a peer-to-peer help forum.

I think it is unlikely to be the relative path causing the problem. Your modules are on your @INC path irresepective of the .. path. Please check your webserver error log for clues.

One possibility comes to mind; if ../lib points to a directory that contains a 'TWiki' subdirectory that contains Sandbox.pm, but it is not readable by the webserver, you might get this error. Check the permissions in ../lib.

Are you running on a virtual site? Sometimes apache virtual site setups are really fussy about permissions.

-- CrawfordCurrie - 27 Apr 2006

I got it fixed!!! Thank you guys for putting me on the right path.

It was the permissions on the /usr/share/perl5 directory. I had looked at the TWiki subdirectory of that one, but not the perl5 directory itself.

Thanks Again!

-- AndrewStewart - 27 Apr 2006

Topic attachments
I Attachment History Action Size Date Who Comment
HTMLhtml configure.html r1 manage 129.1 K 2006-04-26 - 15:34 UnknownUser  
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2006-04-27 - AndrewStewart
 
  • 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.