Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 9663 invoked from network); 28 May 2006 20:30:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 May 2006 20:30:17 -0000 Received: (qmail 61933 invoked by uid 500); 28 May 2006 20:30:16 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 61917 invoked by uid 500); 28 May 2006 20:30:16 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list embperl@perl.apache.org Delivered-To: moderator for embperl@perl.apache.org Received: (qmail 86305 invoked by uid 99); 28 May 2006 10:31:48 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of guslees@gmail.com designates 64.233.184.239 as permitted sender) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ZBziI8DXv+kDdIsyXKLGEzSUTyPGiWBTZ9pI0BlWu9JFJpgf75OObdVwHE6vOHAAFU4QoTwJvWFHUR34F5aiD6Zg/1RFV+5AINdbnYC5RY8iz5VV4DQk5US/jo33UsXBhmvY4TQ1RHOWoSZG6wvjX5dN2amjfIxGHz7ZVvJPde8= Message-ID: Date: Sun, 28 May 2006 11:31:24 +0100 From: "Angus Lees" To: "Todd White" , embperl@perl.apache.org Subject: Re: file upload In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_36067_8968117.1148812284862" References: <44759D2B.50904@cubic.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_36067_8968117.1148812284862 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/25/06, Todd White wrote: > > Shoot! Current circumstances might not allow for a recompiling of > Embperl. Does anyone know of any possible work around? > The problem comes from a change in behaviour of CGI.pm in versions 3.01+ So you could downgrade CGI.pm. Alternatively, the relevant part of the patch is just stashing the $cgi object somewhere for the life of the request. You could patch Embperl.pm and put it somewhere earlier in your @INC path, or redefine just this function in one of your apache startup scripts, etc. --- libhtml-embperl-perl-1.3.6.orig/Embperl.pm +++ libhtml-embperl-perl-1.3.6/Embperl.pm @@ -1,4 +1,3 @@ - ##########################################################################= ######### # # Embperl - Copyright (c) 1997-2001 Gerald Richter / ECOS @@ -935,7 +934,11 @@ else { @ffld =3D $cgi->param; - + + # CGI.pm 3.01+ removes files on DESTROY, so stash + # the CGI object somewhere + $$req{'___CGI___'} =3D $cgi; + my $params ; foreach ( @ffld ) { --=20 - Gus ------=_Part_36067_8968117.1148812284862 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 5/25/06, Todd White <tmwhite@merit.edu> wrote:
Shoot!  Current circumstances might not allow for a recompiling o= f
Embperl.  Does anyone know of any possible work around?

The problem comes from a change in behaviour of CGI.pm in versions 3.01+
So you could downgrade CGI.pm.  Alternatively, the relevant part of th= e patch is just stashing the $cgi object somewhere for the life of the request.  You could patch Embperl.pm= and put it somewhere earlier in your @INC path, or redefine just this function in one of your apache startup scripts, etc.

--- libhtml-embperl-perl-1.3.6.orig/Embperl.pm
+++ libhtml-embperl-perl-1.3.6/Embperl.pm
@@ -1,4 +1,3 @@
-
 #####################################################################= ##############
 #
 #   Embperl - Copyright (c) 1997-2001 Gerald Richter / ECOS=
@@ -935,7 +934,11 @@
            &nb= sp;        else
            &nb= sp;            {
            &nb= sp;           @ffld =3D $cgi->param;
-   
+
+            &n= bsp;          # CGI.pm 3.01+ removes files on DESTROY, so stash
+            &n= bsp;          # the CGI object somewhere
+            &n= bsp;          $$req{'___CGI___'} =3D $cgi;
+
            &nb= sp;           my $params ;
            &nb= sp;           foreach ( @ffld )
            &nb= sp;            =    {


--
- Gus ------=_Part_36067_8968117.1148812284862--