Tags:
create new tag
view all tags

Question

Even tho a test program outside of TWiki finds the perl module just fine, testenv doesn't see it. Any suggestions? I modified testenv to check for the GD.pm module. The module is in /usr/lib/perl5/site_perl/5.8/cygwin:

$ ls /usr/lib/perl5/site_perl/5.8/cygwin/
Digest  GD.pm  auto

Relevant testenv output:

CGI Setup:
Operating system:   Windows (cygwin)
Perl version:   5.8.6-4 (Cygwin)
@INC library path:   ../lib
/usr/lib/perl5/5.8/cygwin
/usr/lib/perl5/5.8
/usr/lib/perl5/site_perl/5.8/cygwin
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/site_perl/5.8
/usr/lib/perl5/vendor_perl/5.8/cygwin
/usr/lib/perl5/vendor_perl/5.8
/usr/lib/perl5/vendor_perl/5.8
.
   Note: This is the Perl library path, used to load TWiki modules, third-party modules used by some plugins, and Perl built-in modules.
TWiki module in @INC path:   
   OK, TWiki.pm found (TWiki version: 02 Sep 2004 $Rev: 1742 $)
Required Perl modules:   
   CGI (3.05)
   CGI::Carp (1.28)
   File::Copy (2.08)
   File::Spec (3.01)
   FileHandle (2.01)
   Digest::SHA1 (2.10)
   MIME::Base64 (3.05)
   Net::SMTP (2.29)
Optional Perl modules:   
   Algorithm::Diff (1.02)
   MIME::Base64 (3.05)
   POSIX (1.08)
   Encode (2.08)
   Note: Optional module 'Unicode::MapUTF8' not installed - check TWiki documentation to see if your configuration needs this module.
   Note: Optional module 'Unicode::Map' not installed - check TWiki documentation to see if your configuration needs this module.
   Note: Optional module 'Unicode::Map8' not installed - check TWiki documentation to see if your configuration needs this module.
   Note: Optional module 'Jcode' not installed - check TWiki documentation to see if your configuration needs this module.
   Digest::MD5 (2.33)
   Note: Optional module 'GD' not installed - check TWiki documentation to see if your configuration needs this module.
PATH_INFO:   
   Note: For a URL such as http://hudson/bin/testenv/foo/bar, the correct PATH_INFO is /foo/bar, without any prefixed path components. Test this now - particularly if you are using mod_perl, Apache or IIS, or are using a web hosting provider. The page resulting from the test link should have a PATH_INFO of /foo/bar.
mod_perl:   Not used for this script (mod_perl not loaded into Apache)
User:   system
   Note: Your CGI scripts are executing as this user.
   Warning: Since your CGI script is not running as user nobody, you need to change the locks in the *,v RCS files of the TWiki distribution from nobody to system. Otherwise, changes to topics will not be logged by RCS.
   Fix: If needed, relock all the rcs files to user system
Group(s):   administrators administrators root

This perl program, run outside of TWiki, works fine:

$ cat gdtest
#!c:/cygwin/bin/perl -wT
use GD;

    # create a new image
    $im = new GD::Image(100,100);

    # allocate some colors
    $white = $im->colorAllocate(255,255,255);
    $black = $im->colorAllocate(0,0,0);
    $red = $im->colorAllocate(255,0,0);
    $blue = $im->colorAllocate(0,0,255);

    # make the background transparent and interlaced
    $im->transparent($white);
    $im->interlaced('true');

    # Put a black frame around the picture
    $im->rectangle(0,0,99,99,$black);

    # Draw a blue oval
    $im->arc(50,50,95,75,0,360,$blue);

    # And fill it with red
    $im->fill(50,50,$red);

    # make sure we are writing to a binary stream
    binmode STDOUT;

    # Convert the image to PNG and print it on standard output
    print $im->png;

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Win2kPro
Web server: Apache 1.3.33
Perl version: 5.8.6
Client OS:  
Web Browser:  
Categories: Fatal error

-- SteveAnthony - 04 Mar 2005

Answer

This might be a permissions issue - see JuditMay's updates to WindowsInstallCookbook (may still be in separate page in Codev) for hints on permissions.

Might be useful to see the whole of testenv output, and to turn your test program into a CGI script that just does 'use CGI; use CGI::Carp;' at the top, to see what the actual error is.

-- RichardDonkin - 04 Mar 2005

I stopped Apache (running as a service) and restarted on the cygwin command line, running as 'me'. Re-ran testenv and it finds the module no problemo. So, must be a permissions problem. Now to figure out how to adjust the file ownership/groupship and permission bits.

-- SteveAnthony - 05 Mar 2005

In /usr/lib/perl5 I did:

% chgrp -R Administrators *

And started Apache as myself. Found the module. Stopped Apache and restarted as a service. Found the module! Yay!

Thanks for your help Richard!

-- SteveAnthony - 05 Mar 2005

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-03-06 - FranzJosefSilli
 
  • 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.