Tags:
create new tag
view all tags

Question

I am having problems getting Twiki.pm to be found. When running testenv or view from the command line, there are no issues. However, when running it via the web, it cannot find Twiki.pm.

Instead of testenv saying that it can't find TWiki.pm, the script just abruptly ends. So there is no text after "TWiki module in @INC path:".

Before that, the @INC path contains the FULL path to my lib directory. I have copied and pasted into a terminal ls command, and it is correct. All files are executed under suexec as the file owner (the same one executing it from the command line as well). All permissions allow the user to read them as well.

As I mentioned, I do not get a TWiki.pm not found. The script just dies at line 365:


$mod = 'TWiki'; eval "use $mod";

If I comment out the eval line, the script continues on and validates TWiki.cfg which is good for the most part.

Would there be any restrictions to be configured for the webserver or suexec that prohibit adding new path to INC or something strange like that.

Environment

TWiki version: TWikiBetaRelease2004x10x30
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL 3
Web server: apache 1.3.31
Perl version: 5.8.0
Client OS: Linux
Web Browser: Firefox
Categories: Installation

-- RobSettle - 19 Feb 2005

Answer

Check your apache log file, and twiki/data/warning.txt, for more info. Sometimes error messages end up in odd places. I don't think there is any way the apache configuration could prevent @INC changes. Make sure that the permissions aren't preventing tha apache user from reading any of the files in the installation, though.

-- CrawfordCurrie - 20 Feb 2005

Apache log file shows 'Premature end of script headers', suexec shows that the command was executed under the correct user (doesn't care that it later bombed), and warning.txt has "28 Oct 2004 - 15:03 TWiki::Net::getUrl connect: Connection timed out". I've also tried this with the stable release. No luck. I tried various work around, debugging flags with perl, and debug print statements. It all comes down to that "use" statement even though the path is correct. Like I mentioned above, this works perfectly from the command line under the same user.

This is the first wiki I've ever tried, and I'm excited to use it because it appears to be more project oriented than others with many plugins. As a temporary workaround, I'm playing with mediawiki which I had installed in 2 minutes, but it doesn't appear to be as project focused as twiki.

Obviously, this must be an apache/perl problem on my machine. One other note is that I'm using the HSphere to control my web hosting services, so the RHEL environment doesn't completely apply since HSphere has its own binaries for apache and such. This is the first problem I've had running cgi on this server, but most of my projects are in php using suphp not perl using suexec.

Any advice is appreciated.

-- RobSettle - 21 Feb 2005

TWiki is - as you have noted - a little bit more sophisticated than mediawiki. I know that's no excuse for TWiki, but it does mean that the requirements are a bit more rigid.

As for this problem, I for one have never encountered anything like this before, which makes giving advice a bit random. Unless someone else has an insight I can only suggest getting back to basics, Does any perl script work as a CGI script from your TWiki bin directory? Try this:

#!/usr/bin/perl -wT
use CGI;
my $query = new CGI();
print $query->header('text/plain');
print "Cogito ergo sum\n";
print eval "use TWiki";
die $@ if @;
print "Quis custodiet ipsos custodes?\n";
(save it to the bin directory, to a file called "blah". Make sure permissions are correct. Then edit a view url and replace "view" with "blah".

-- CrawfordCurrie - 21 Feb 2005

Rob,

Although only a neophyte myself I would fire up Firefox from the command line via strace. This will log every system call made by Firefox and will produce a huge output file which it will be necessary to sed to cut down, however once it is fired up run testenv via the browser and check the log to see what calls firefox is actually making rather than what you think it is making.

Syntax of the strace command is: strace --output=outputfilename command although man strace on DeadRat just to be sure.

Quis custodiet ipsos custodes?

Omnes!

-- SteveMayes - 23 Mar 2005

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2005-05-01 - 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.