Click to See Complete Forum and Search --> : upload error


Calin
02-20-2003, 08:26 AM
Hi All,

I designed a small site useig cgi scripts and there I have an upload page. The problem is that I got error "document is empty" when I try to upload some files using netscape 4.78 (solaris) and I got no error when I'm using Mozilla. The error ocur after few minutes from the start of the upload.

If somebody knows something about that .... please help me.

Thank you,

jeffmott
02-20-2003, 11:02 AM
Can we see the code?

Calin
02-24-2003, 07:33 AM
<FORM NAME=run method='POST' enctype='multipart/form-data' action="cgi-bin/upload.cgi>
<INPUT TYPE=FILE NAME=file SIZE=20 MAXLENGTH=40>
<INPUT TYPE=SUBMIT ......

upload.cgi
-------------
$in = &ReadParse;
open udinfo, "upload.file";
print udinfo "$file_typ $fn\n";
close udinfo;
.....

Thank you,

jeffmott
02-24-2003, 09:50 AM
Chances are good that your ReadParse routine does not correctly handle multipart streams. You should use the CGI module instead.

And just on another note, all your scripts should be run with use strict and use warnings and corrections made for the problems they find.

Calin
02-25-2003, 02:23 AM
Hi, Thank you for helping me.
This ReadParse subroutine is from cgi-lib.pl. I found this library on Internet. I don't have much experience with CGI but I'm learning :) So I don't understand the meaning of the 'use strict and use warning and corrections'. If you have time please tell me how to use this.

Thanks.

jeffmott
02-25-2003, 10:35 AM
You can find much more information at http://www.perldoc.com/

celebguy_dv
03-04-2003, 12:56 AM
http://banners.dollarmachine.com/pic/2014000/hal001.gif (http://www.kinkyceleb.com/1261795520)