dcsimg
www.webdeveloper.com
Results 1 to 7 of 7

Thread: upload error

  1. #1
    Join Date
    Feb 2003
    Location
    Suceava
    Posts
    3

    Angry upload error

    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,

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    Can we see the code?

  3. #3
    Join Date
    Feb 2003
    Location
    Suceava
    Posts
    3
    <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,

  4. #4
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    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.

  5. #5
    Join Date
    Feb 2003
    Location
    Suceava
    Posts
    3
    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.

  6. #6
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    You can find much more information at http://www.perldoc.com/

  7. #7
    celebguy_dv Guest

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles