I have a problem with a perl cgi used to upload files.

It was working fine until my hosting provider making some upgrade in the server.

Now, it can upload files undes 460 Mb, but not over it. If try, a file of 0 length is created and the cgi continue, but file is not stored.


I tryied using $CGI::POST_MAX = 1024*1024 * 1024; and $CGI::POST_MAX = -1; but no one of it worked. (I put them before creating the new CGI object named $cgi_this.

Check on error log, and no information.

Does the buffer need to be cleaned or something similar?


Any idea about where it comes the problem?



# Load system modules
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use warnings;
use strict;

# Create global variables
my $str_STOREDIR = '~/public_html/tmp';
my $cgi_this = new CGI;
my $file_file = $cgi_this->upload('video_file') || 0;
my $str_file = $cgi_this->param('video_filename') || 0;
my $str_buffer;


     if (open (hFILE, ">$str_STOREDIR/$str_filename"))
       {
       binmode hFILE;
       binmode $file_file;
       while (read($file_file,$str_buffer,1024))
         { print hFILE $str_buffer; }
       close (hFILE);
       }

Atentamente,

J. Alejandro Ceballos Z.

   w: http://alejandro.ceballos.info
   e: bu...@alejandro.ceballos.info
   m: +52 (33) 1411.6079




--
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/


Reply via email to