Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

It may very well be just a timeout problem like joealba said, but your perl code could be the problem. (Your HTML form looks fine.) To elaborate:

When you submit a multipart form, your browser packages up the file you specified in the file field and sends it along in the HTTP request to the server. So the initial request is when the actual transfer takes place, which can make it appear that it's hung, when it's really just still sending. CGI.pm reads in the file, and places it in a temp file. Only then is your program really able to spit headers and content back to the browser. So if it's a big file and you're on a modem, it will appear to hang, and may even time out.

(You don't have to process the file, it will just be deleted if you don't.) Try a simple CGI response like:

#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; print $q->header(); if ($q->param()) { print $q->ul( 'Got Something:', $q->li( [map {"$_: ".$q->param($_)} $q->param()] ) ); } else { print 'Got squat, sorry'; }

Anyway, go ahead and post your code, someone will be able to spot the breaking point if there is one.

PS, I have noticed that in particular IE 5.5 on MacOS seems to have trouble sometimes with all of my CGI.pm-based upload scripts. If that's your OS, you might try debugging from another machine to be sure it's not a client-specific problem.


In reply to Re: CGI file upload - endless loop?? by sedhed
in thread CGI file upload - endless loop?? by lpoht

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 03:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found