Tags:
create new tag
, view all tags

Question

Getting "Can't locate TWiki/UI.pm" on all twiki pages except configure

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL5.1
Web server: Apache 2.2.3-11.el5_1.3
Perl version: perl-5.8.8-10.el5_0.2
Client OS: Win XP
Web Browser: IE 7
Categories: Fatal error

-- EricAiken - 05 Jun 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

I had a working env but killed it.. I get http 500 error.  Based on the HTTP error /opt/TWiki/lib is not in my @INC, 
but in the configure CGI it is.

also my <nop>LocalLib.cfg</nop> twikiLibPath is absolute.
$twikiLibPath = "/opt/TWiki/lib";

After alot of troubleshooting, I removed and reinstalled perl, all my modules, twiki and still get this error.  

I'm not sure where to go from here, what am I missing?

http error log

:
Can't locate TWiki/UI.pm in @INC (@INC contains: . /lib /opt/TWiki/bin /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 /etc/httpd) at /opt/TWiki/bin/view line 30.\nBEGIN failed--compilation aborted at /opt/TWiki/bin/view line 30.\n

Configure CGI

:
/opt/TWiki/lib
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8
.
/opt/TWiki/lib/CPAN/lib//arch
/opt/TWiki/lib/CPAN/lib//5.8.8/i386-linux-thread-multi
/opt/TWiki/lib/CPAN/lib//5.8.8
/opt/TWiki/lib/CPAN/lib/

-- EricAiken - 05 Jun 2008

I finally found the answer at a blog.

http://blogs.sun.com/alanbur/entry/twiki_rant

basically, when using mod_perl you can't dynamically change @INC. Whether in LocalLib.cfg or not. You need to restart apache for @INC to be updated.

"When running under mod_perl, once the server is up @INC is frozen and cannot be updated. The only opportunity to temporarily modify @INC is while the script or the module are loaded and compiled for the first time. After that its value is reset to the original one. The only way to change @INC permanently is to modify it at Apache startup. "

-- EricAiken - 05 Jun 2008

 
Change status to:
Topic revision: r2 - 2008-06-05 - EricAiken
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.