Question
I'm having several problems getting Twiki installed, perhaps related. I've followed all the Windows cookbooks and IIS topics I could find. I am using
ActivePerl and Cygwin.
The first problem is that in Configure in the CGI section, I can't get Twiki.pm to load because "Can't locate TWiki/Sandbox.pm in
@INC
(
@INC
contains: ../lib C:/Perl/lib C:/Perl/site/lib .)"
I am loading configure from
http://webserver/twiki/bin/configure
, and there is in fact a Sandbox.pm locating in /twiki/lib/Twiki. So it should load, right? I assume the relative path reference starts at the current directory that configure is in.
The other problem (probably related to the above) is that when I try to load view.pl, I get "The specified CGI application misbehaved by not returning a complete set of HTTP headers." I have changed the first line on all .pl files to "#!C:\Perl\bin\perl.exe -wT" as directed.
I don't know if this is related, but I had to manually copy Twiki.cfg and Twiki.pm to c:\perl\lib for them to load. Is that normal?
One other note: this machine is also running a PHP application, not sure if that could cause some problem.
Any help would be appreciated.
Eric
Environment
--
EricAlderman - 26 Feb 2006
Answer
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.
It would help to have the full output of
configure (all options expanded), but in the interim, this is almost certainly an issue with
setlib.cfg - make sure this is using an absolute pathname of the form
c:/foo/bar for the TWiki lib directory. Using
../lib as you are doing will not work, as the current directory is often not what you think it might be.
You should also delete the versions of TWiki.pm and TWiki.cfg in your c:\perl\lib directory - having to copy them is not normal and is addressing the symptom not the problem. (Back them up first of course.) Also, once you have edited
setlib.cfg (in the
bin directory), you should only need to run
configure, which generates
LocalSite.cfg. Part of the problem here is that the docs on Windows installation of TWiki have not been updated for TWiki 4.0 - check the main TWiki docs at
TWikiDocumentation first, as these have been updated. In particular, it is now essential to use absolute paths in TWiki 4.0, which was not the case for the Sep 2004 release.
I'll make a small update to
WindowsInstallCookbook, but volunteers to do real updates for all Windows-installation docs on TWiki.org are very welcome as I don't have much time!
Also, it's worth looking at
TWikiVMDebianStable which can get you a running TWiki 4.0 on any Windows server very quickly, but does not use IIS (it actually uses
TWikiOnLinux on top of Windows).
--
RichardDonkin - 26 Feb 2006
Thanks for the assistance. I'll attach a full output from configure.
I'm a little confused though. Setlib.cfg has a warning saying I'm not supposed to edit it, but to create
LocalLib.cfg instead. I've done that, and in that file have the line:
$twikiLibPath = "C:/Inetpub/wwwroot/twiki/lib";
(I tried with slashes both ways.) I renamed the Twiki.cfg,
LocalSite.cfg, and Twiki.pm that I had in c:\perl\lib. Now when I open configure, it says "Cannot locate
LocalSite.cfg. Is your setting for $twikiLibPath correct in bin/LocalLib.cfg?".
Obviously I'm doing something wrong...
--
EricAlderman - 26 Feb 2006
I think the key thing is to set
@INC
correctly, which should be possible using PERLLIB or
PERL5LIB environment variables. Check the
perldoc perlrun manual page, and the IIS docs on environment setting.
--
RichardDonkin - 26 Feb 2006
Thanks, but I went ahead and took your advice and installed
TWikiVMDebianStable. Much easier! I'm up and running.
Eric
--
EricAlderman - 27 Feb 2006
I'm not sure it it's the right thing to do, but I resolved the "Cannot locate
LocalSite.cfg" error by specifying the $twikiLibPath in the setlib.cfg file.
eg.
eval 'require "LocalLib.cfg"';
my $twikiLibPath = "e:/inetpub/wwwroot/lib";
--
AndrewRobinson - 19 Apr 2006
Like
AndrewRobinson, I had to go the hardcoded hack way. I don't remember exactly what changes I made but it went something like this:
- Added the same line AndrewRobinson mentions above
- changed all references to "LocalSite.cfg" in config.pl to the full hardcoded path
- changed every other pl script (from view.pl onwards), setting the path lookup from '.' to the full hardcoded path of the bin folder.
Basically, it looks like in my setup (IIS5 on
Win2K,
ActiveState Perl, using RCSLite for the time being) the perl.exe simply does not have access to '.', or executes in some weird folder of its own. The local script name variable doesn't seem to work either.
The fascinating this is that this worked great on
WinXP with IIS 5.1, but also did NOT work with
Win2K3 , IIS6! It looks like the path thing is somehow related to the hardened security settings on our production servers (or something like that). I could not find any references to this behavior anywhere else online, so I give up, I'll live with all the hardcoded paths. So far everything else works.
--
TaoKlerks - 03 Jul 2006