Bug: Testenv has a dependency on cygwin.dll
I just downloaded and tested testenv from
CookbookActivePerlTestenv, and while testing it, it came up with a Windows box saying cygwin.dll couldn't be found on the path. I use cygwin utlities and TWiki itself doesn't seem to have any problems wrt to finding cygwin.dll, so I'm not sure where the problem arises.
I also noticed this displayed in the browser:
[Fri Mar 29 20:15:29 2002] testenv: Use of uninitialized value in concatenation (.) or string
at h:\apache\twiki\bin\testenv line 402. RCS Version:
Note: This is the version of RCS which will be used.
[Fri Mar 29 20:15:29 2002] testenv: Use of uninitialized value in numeric
lt (<) at h:\apache\twiki\bin\testenv line 409.
BTW, why did testenv show the content of my Zwiki cookie???
This test is meaningless on Windows:
Member of group(s): [Can't identify groups - no Cygwin 'id' or 'sh' command on path]
Test case
Enter this in a browser:
http://localhost/twiki/bin/testenv
Environment
| TWiki version: |
Dec 2001 |
| TWiki plugins: |
not applicable |
| Server OS: |
Windows 2000 Pro |
| Web server: |
Apache 1.3.23 |
| Perl version: |
ActiveState 5.6.1 build 630 |
| Client OS: |
Windows 2000 Pro |
| Web Browser: |
IE 6.0 |
--
DavidLeBlanc - 29 Mar 2002
Follow up
Please attach your TWiki.cfg and the whole output from
testenv, or a URL if a public site - it's hard to see exactly what happened here, particularly the bit about showing a cookie since you don't say where this happened. Testenv does nothing with cookies so I'm curious to see how it could show one!
The dialogue box problem is because you have a Cygwin command on your path (e.g.
id or
grep), but you don't have
cygwin1.dll on the path - in other words, the Cygwin setup as seen from testenv is broken. While testenv tries to accommodate unusual setups, I don't think it's worth the extra complexity of trying to handle this - just put cygwin1.dll in the same directory that contains the Cygwin executables found by testenv, or pass a suitable PATH variable in through Apache. Normally, the executables and DLL live in the '/bin' directory, e.g.
c:/cygwin/bin.
In any case, if you have a properly installed Cygwin, or Cygwin is not installed at all, this dialogue box will not appear.
The warning messages are probably a consequence of some command failing, most likely
ci.exe at line 402, e.g.
ci.exe is failing in an unusual way due to the PATH, e.g. it can't find
diff and fails silently. Anyway, try the attached patch file (just do
patch -i testenv.patch within the bin directory), which managed to suppress these messages when I simulated a
ci.exe failure here. Or you can download from
CVS:bin/testenv
.
As for the 'meaningless' test - the point of this is to show you the groups you are in, which is rather hard to do with Win32 APIs, and is relevant if people are running under Cygwin
ntsec mode. The reason it has no output is that the Cygwin
id command did not succeed, hence the message.
--
RichardDonkin - 29 Mar 2002
Updated version of email sent recently:
The original testenv script doesn't set $ENV{PATH} to $safeEnvPath, hence the difference. I have now done a version that does, as well as some other checks for
ActivePerl etc, which you can get from the
CookbookActivePerlTestenv (or just use
CVSget:bin/testenv
)
The new testenv should fix the DLL missing problem since g:/cygwin/bin is on the $safeEnvPath, which it now uses. Without this version of testenv, you could also fix this by adding g:\cygwin\bin to the System Environment's PATH (or using Apache
SetEnv).
I've committed some changes to CVS re TWiki.cfg that should make the whole setup issue on Cygwin/ActivePerl a bit clearer - much depends on the
PERL5SHELL setup, see the
CookbookActivePerlSetup for details. Using the 'bash' setup works best IMO, I've had problems with using cmd.exe though it should work in theory.
Re
RCS problems - try
TWikiDebugging's section on
RCS debugging to see the commands actually used. Also, try the list of tests at
WindowsInstallCookbook to isolate what's actually not working.
Hope this helps.
--
RichardDonkin - 02 Apr 2002
Fix record