Home  |  Linux  | Mysql  | PHP  | XML
From:J Alejandro Ceballos Z Date:Mon Mar  1 15:57:41 2010
Subject:Problem uploading large files (broken storing)

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: buzon@alejandro.ceballos.info
m: +52 (33) 1411.6079



Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
RE: how to add support of Msql and CGI in Apache
RE: Global scope
RE: how to add support of Msql and CGI in Apache
CGI ap on NetworkSolutions host
Are there any free web hosting providers who also allow perl scripting?



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants