Tags:
installation1Add my vote for this tag upgrade1Add my vote for this tag create new tag
, view all tags

Question

It doesn't matter which plugin i'm trying to install, I'll always get a error message like this:

Fetching http://twiki.org/p/pub/Plugins/ActionTrackerPlugin/ActionTrackerPlugin.tgz...
Warning: I can't install http://twiki.org/p/pub/Plugins/ActionTrackerPlugin/ActionTrackerPlugin.tgz because I don't recognise the download as a gzip file.
Warning: Extension may not have been packaged correctly. Trying for a .zip file instead.

Fetching http://twiki.org/p/pub/Plugins/ActionTrackerPlugin/ActionTrackerPlugin.zip...
Warning: I can't install http://twiki.org/p/pub/Plugins/ActionTrackerPlugin/ActionTrackerPlugin.zip because I don't recognise the download as a zip file.
Error: Please follow the published process for manual installation from the command line. 

Does anyone know what's wrong?

Thanks in advance,

Environment

TWiki version: 4.1.2
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: linux
Web server: apache 2.2.0
Perl version: 5.8.7
Client OS: win xp
Web Browser: ff 2.0.0.3
Categories: Installation, Plugins

-- CarloSchulz - 24 Apr 2007

Answer

ALERT! 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.

mmm, no, thats odd. especially as i just did the same thing from my computer, and it works first time.

2 possibles:

  1. the apache does not have write access to enough of your twiki - Note that the webserver user has to be able to write files everywhere in your TWiki installation.
  2. just in case, take a look at your apache error log file, it might have more info too

-- SvenDowideit - 24 Apr 2007

I have part of the same problem - my configure is never able to install .tgz files. It has no problem with .zip files, though. For reference, I'm running

  • TWiki 4.1.1
  • Solaris 10
  • Apache 1.3.36
  • Perl 5.8.4
  • Client OS Win XP
  • Web Browser FF 2.0.0.3
So the only things my situation has in common with Carlo's are client-side.

I have no problem downloading and installing .tgz files manually, so I highly doubt that permissions are the issue.

I looked in my Apache error log, and I see the following at the time stamp that I tried to install via configure:

  1. Subroutine TWiki::Configure::Checker::tmpfile redefined at /usr/perl5/5.8.4/lib/Exporter.pm line 65. at /usr/perl5/5.8.4/lib/i86pc-solaris-64int/POSIX.pm line 19
  2. A long list of lines beginning Can't locate TWiki/Plugins/AccessStatsPlugin.pm in @INC and seeming to list every plugin.
Anyone else have suggestions?

-- JohnWorsley - 11 May 2007

This is a known problem. The problem is that the Apache headers have to be exactly right for configure to accept the files. Not only correct but also at the right position in the headers.

The problem should be resolved in the code that becomes 4.2.0 eventually.

See Bugs:Item3914

This is the patch of the resolution in case you want to fix your 4.1.2 now.

Modified: twiki/branches/Patch04x01/lib/TWiki/Configure/UIs/EXTEND.pm
===================================================================
--- twiki/branches/Patch04x01/lib/TWiki/Configure/UIs/EXTEND.pm   2007-04-27 09:16:06 UTC (rev 13537)
+++ twiki/branches/Patch04x01/lib/TWiki/Configure/UIs/EXTEND.pm   2007-04-27 09:16:51 UTC (rev 13538)
@@ -60,12 +60,6 @@
 <pre>$@</pre>
 HERE
         undef $ar;
-    } elsif ($ar !~ s!^.*Content-Type: application/x-gzip\r\n\r\n!!is) {
-        print $this->WARN(<<HERE);
-I can't install $arf because I don't recognise the download
-as a gzip file.
-HERE
-        undef $ar;
     }
 
     if (!defined($ar)) {
@@ -85,12 +79,6 @@
 <pre>$@</pre>
 HERE
             undef $ar;
-        } elsif ($ar !~ s#^.*Content-Type: application/zip\r\n\r\n##is) {
-            print $this->WARN(<<HERE);
-I can't install $arf because I don't recognise the download
-as a zip file.
-HERE
-            $ar = undef;
         }
     }

-- KennethLavrsen - 12 May 2007

After applying the patch I get the following error:

Software error:

Invalid header block at offset unknown at /data/webserver/infopool.intra/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 304

Not sure whether I understood this patch thing correctly. Do I have to delete the lines starting with a - ? Because that's what I did... and now I have another error frown

-- CarloSchulz - 14 May 2007

Found exactly the same issues (even after doing the above patch) on a fresh install of 4.1.2 on Linux. We had a lot of plugins from 4.0 and I'd really have to retrace my steps installing all of them by hand. This is a very cool way to handle plugins-- if it will work!

-- CrisRhea - 28 May 2007

Did some digging... The patch above is NOT CORRECT-- it simply deletes the check for Content-Type, BUT this code also strips off the HTTP header (which is needed).

I suggest the following changes (diff against 4.1.2):

# diff EXTEND.pm EXTEND.pm.orig
63c63
<     } elsif ($ar !~ s!^.*Content-Type: application/x-gzip.*\r\n\r\n!!is) {
---
>     } elsif ($ar !~ s!^.*Content-Type: application/x-gzip\r\n\r\n!!is) {
88c88
<         } elsif ($ar !~ s#^.*Content-Type: application/zip.*\r\n\r\n##is) {
---
>         } elsif ($ar !~ s#^.*Content-Type: application/zip\r\n\r\n##is) {
147,153c147
<             if (-d "$dir/$file") {
<                 unless (mkdir($ef)) {
<                     print $this->ERROR(
<                         "Cannot create directory $ef: $!");
<                     die "Installation terminated";
<                 }
<             } elsif (!File::Copy::move("$dir/$file", $ef)) {
---
>             unless (File::Copy::move("$dir/$file", $ef)) {
245d238
<         closedir($d);

The first part fixes the HTTP header issue, the second part are the changes suggested in: http://twiki.org/cgi-bin/view/Support.InstallingPluginsDreamhostErrors

I was able to install about a dozen plugins after making these changes.

(I can never remember if Perl matches the max or first occurance in a pattern-- this may be a flaw in my suggested code)

-- CrisRhea - 29 May 2007

According to my trusty Perl manual, I should have used ".*?" (minimal matching), rather than ".*" (greedy matching).

-- CrisRhea - 29 May 2007

Thanks Cris for the report and fix. Tracked in Bugs:Item4161.

-- PeterThoeny - 29 May 2007

I think your diff is backward, it should be old vs. new, not the other way around. Also, please try a diff -u

-- PeterThoeny - 29 May 2007

I'm a bit confused as I don't now what I have to aplly from the fix above...

-- CarloSchulz - 30 May 2007

Sorry Peter-- you are quite correct in your comments about my diff. It was a quick-n-dirty that I figured the core developer types would understand. I was being lazy.

Sorry to add to the confusion Carlo-- I just e-mailed a copy of my patched EXTEND.pm to you. Hope this helps.

-- CrisRhea - 06 Jun 2007

Can the patched version of EXTEND.pm be made more generally available?

-- EdMcDonagh - 06 Jul 2007

I have attached CrisRhea's File

-- BrianMahoney - 11 Jul 2007

With the attached file, I get this: Use of uninitialized value in pattern match (m//) at /www/foo.bar.org/twiki4/lib/TWiki/Configure/UIs/EXTEND.pm line 233.

--Main.MarcioMarchini

-- MarcioMarchini - 31 Aug 2007

Newbie question: how do I apply the attached patch?

-- MirenBerasategi - 08 Oct 2007

just go to twiki/lib/TWiki/Configure/UIs/ and replace the existing file with the attached patch file

-- CarloSchulz - 09 Oct 2007

Change status to:
Topic attachments
I Attachment History Action Size Date Who Comment
Perl source code filepm EXTEND.pm r1 manage 10.3 K 2007-07-11 - 15:36 BrianMahoney CrisRhea'sExtend.pm
Edit | Attach | Watch | Print version | History: r17 < r16 < r15 < r14 < r13 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r17 - 2007-10-09 - CarloSchulz
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.