Re: Apache::UploadMeter

2003-07-23 Thread Sven
I had some problems with my server-configuration (httpd.conf) but now it
works perfect.
Thanks to Issac for the fast help and the cool module.

 Hope this gets you started,
   Issac






Re: Apache::UploadMeter

2003-07-22 Thread Issac Goldstand
Sven wrote...

[snip]
-
use Apache ();
use Apache::Request ();
$apr = Apache::Request-new($r);
foreach $parm($apr-param){
 print -.$parm. : .$apr-param($parm).\n;
}
print -\n;
-

First of all, use instance() instead of new().  I believe the documentation
for Apache::UploadMeter mentions this.

[snip]

Can someone show me an example of a upload.pl where a file is
stored on the server please?

Sure.  Here is the response handler for the testbed for Apache::UploadMeter
at http://epoch.beamartyr.net/umtest/form.html

package ApacheUploadMeterTest;
use Apache::Request;
use Apache::Constants qw(OK DECLINED);
use CGI::Carp qw(fatalsToBrowser);
use Data::Dumper;
sub handler {
my $r=shift;
my $q=Apache::Request-instance($r, POST_MAX=2097152);
# Actually, the above line doesn't work - POST_MAX will be a parameter
to
# Apache::UploadMeter in future releases
local($|)=1;
my $num=0;
print PART1;
Content-Type: text/html

HTML
HEAD
TITLEApache::UploadMeter Test Module/TITLE
/HEAD
BODY
H1Upload Complete/H1
PART1
foreach my $upload ($q-upload) {
$num++;
my $name=$upload-name;
my $size=$upload-size;
my $filename=$upload-filename;
my $type=$upload-type;
my $info=Dumper($upload-info);
my $tempname=$upload-tempname;
print EOP
UL
LIUpload field: $num/LI
LIDetected upload field: $name/LI
LIDetected filename: $filename ($size bytes)/LI
LIReported MIME type: $type/LI
LISpool file: $tempname/LI
LIOther debug info: $info/LI
/UL
EOP
}
print /BODY/HTML\n;
return OK;
}
1;

Hope this gets you started,
  Issac




Re: Apache::UploadMeter

2003-07-22 Thread Sven
Thanks - I´ll try it and send response.
I´ve read all readme-files and the build-in manual but I did´nt find
something about that I have to use instance()...
- Original Message - 
From: Issac Goldstand [EMAIL PROTECTED]
To: Sven [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 3:21 PM
Subject: Re: Apache::UploadMeter


 Sven wrote...

 [snip]
 -
 use Apache ();
 use Apache::Request ();
 $apr = Apache::Request-new($r);
 foreach $parm($apr-param){
  print -.$parm. : .$apr-param($parm).\n;
 }
 print -\n;
 -

 First of all, use instance() instead of new().  I believe the
documentation
 for Apache::UploadMeter mentions this.

 [snip]

 Can someone show me an example of a upload.pl where a file is
 stored on the server please?

 Sure.  Here is the response handler for the testbed for
Apache::UploadMeter
 at http://epoch.beamartyr.net/umtest/form.html

 package ApacheUploadMeterTest;
 use Apache::Request;
 use Apache::Constants qw(OK DECLINED);
 use CGI::Carp qw(fatalsToBrowser);
 use Data::Dumper;
 sub handler {
 my $r=shift;
 my $q=Apache::Request-instance($r, POST_MAX=2097152);
 # Actually, the above line doesn't work - POST_MAX will be a parameter
 to
 # Apache::UploadMeter in future releases
 local($|)=1;
 my $num=0;
 print PART1;
 Content-Type: text/html

 HTML
 HEAD
 TITLEApache::UploadMeter Test Module/TITLE
 /HEAD
 BODY
 H1Upload Complete/H1
 PART1
 foreach my $upload ($q-upload) {
 $num++;
 my $name=$upload-name;
 my $size=$upload-size;
 my $filename=$upload-filename;
 my $type=$upload-type;
 my $info=Dumper($upload-info);
 my $tempname=$upload-tempname;
 print EOP
 UL
 LIUpload field: $num/LI
 LIDetected upload field: $name/LI
 LIDetected filename: $filename ($size bytes)/LI
 LIReported MIME type: $type/LI
 LISpool file: $tempname/LI
 LIOther debug info: $info/LI
 /UL
 EOP
 }
 print /BODY/HTML\n;
 return OK;
 }
 1;

 Hope this gets you started,
   Issac






Re: Apache::UploadMeter configuration problem

2003-02-13 Thread Cees Hek
Quoting Konstantin Yotov [EMAIL PROTECTED]:

 Hello! :)
 I install Apache::UploadMeter, but when I when I add
 this in startup.pl
 use Apache::UploadMeter;
 
 $Apache::UploadMeter::UploadForm='/form.html';
 $Apache::UploadMeter::UploadScript='/perl/upload';
 $Apache::UploadMeter::UploadMeter='/perl/meter';
 
 Apache::UploadMeter::configure;
 
 following instruction from this modul help, Apache 
 starts with error
 Use of uninitialized value in numeric gt () at
 /usr/lib/perl5/site_perl/5.6.1/Apache/UploadMem line
 300.
 /usr/sbin/apachectl: line 211:  5235 Segmentation
 fault  $HTTPD -t

You are getting a segfault, and need to provide a backtrace if anyone is going
to be able help you.  If you read the SUPPORT document that comes with mod_perl,
it will explain what information you should include, including instructions on
how to get a backtrace.

Also note that Apache::UploadMeter requires StackedHandlers support to be built
into mod_perl (you should be able to look in Apache::MyConfig to see if you have
StackedHandlers support).  

I suspect that your problem doesn't have anything to do with Apache::UploadMeter
directly though.  The message Apache provides about Apache::UploadMeter is just
a warning, not a fatal error.


Cees