Re: Annotea server installation problems

Yvan.Norsa@loria.fr wrote:
> Hi,
> 
> I'm currently working on a project involving annotations. Last month, I succeeded to install the Annotea server on a Debian, following the instructions (minus the authentification things, which I don't need).
> But now I am unable to install it on another server, at least without using apt-get. I suspect my problem is somehow related to DBI and/or DBD-mysql.
> Here is the error : 
>  died with Not a GLOB reference at ../../../W3C/Util/W3CDebugCGI.pm line 576.
> 
> Can anybody help ?

Do you have CGI.pm version 3.01 or greater?

perl -MCGI -e "print $CGI::VERSION"

If so, you could try the attached patch to W3CDebugCGI.pm. It's based on 
the V1_2 version of the server, so it may need some small adaptation for 
your version.

Hope that helps,

Matthew Wilson
Index: W3CDebugCGI.pm
===================================================================
RCS file: /sources/public/perl/modules/W3C/Util/W3CDebugCGI.pm,v
retrieving revision 1.83.2.1
diff -u -r1.83.2.1 W3CDebugCGI.pm
--- W3CDebugCGI.pm	8 Sep 2003 19:26:44 -0000	1.83.2.1
+++ W3CDebugCGI.pm	23 Mar 2005 21:04:11 -0000
@@ -615,7 +615,18 @@
 # overloaded function so we can grab the POST_STRING
 
 sub read_from_client {
-    my($self, $fh, $buff, $len, $offset) = @_;
+    # NB the definition of read_from_client changed in CGI.pm 3.01.
+    # Version 3.00 calls "$self->read_from_client(\*STDIN,\$query_string,$content_length,0)"
+    # Version 3.01 calls "$self->read_from_client(\$query_string,$content_length,0)"
+    my($self, $fh, $buff, $len, $offset);
+    if (scalar @_ == 5) {
+        ($self, $fh, $buff, $len, $offset) = @_;
+    } elsif (scalar @_ == 4) {
+        ($self, $buff, $len, $offset) = @_;
+        $fh = \*STDIN;
+    } else {
+        die "Unexpected arguments in read_from_client";
+    }
     local $^W=0;                # prevent a warning
     return undef unless defined($fh);
     no strict; # 'cause CGI.pm insists on passing filehandles around by name, not GLOB

Received on Wednesday, 23 March 2005 21:30:22 UTC