Hey guys...I'm having some serious trouble using the file upload feature
in CGI.pm in conjunction with Tomcat 5.0.24.  When I try and upload the
file to my script for parsing the script hangs and prints nothing to the
browser (in other words it's the script is erring out).  Here's where
the plot thickens...when I try and upload a file with six or seven lines
of data it goes through fine.  When I try and upload any file >5k or so
the script hangs.  The file is just a standard text file with fields
delaminated by pipes ( | ).  Below is the error in the log file:

2004-07-09 15:53:15 StandardContext[/management]cgi: runCGI
(stderr):CGI.pm: Server closed socket during multipart read (client
aborted?).
2004-07-09 15:53:15 StandardContext[/management]cgi: runCGI: 1 lines
received on stderr


I've tried modifying the clientInputTimeout parameter in web.xml but to
no avail.  It still errors out no matter high I set it.  I've also tried
changing the timeout times in server.xml.  I'm not really sure what the
deal is.

Below is the exact form code I'm using to pass the form to the script:

<FORM ACTION="cgi-bin/data_import.cgi" METHOD="post"
ENCTYPE="multipart/form-data">
                file: <INPUT TYPE="file" NAME="leadfile">
                <P>
                <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form">
</FORM>


Below is the exact perl code I'm using to grab the data:

$query = new CGI;                         
$lead_file = $query->upload("leadfile");  
@lines = <$lead_file>;



As you can see I'm not doing anything weird or different
here...basically I'm just trying to get a text file to parse and insert
into a database.  The script works great being executed from a command
line or if you send up a few lines of text, but dies otherwise.  Any
help on this would be greatly appreciated...I haven't been able to find
any reference to this problem on the web.  Thanks a lot!


------------------------------------
Brian Dittmer <[EMAIL PROTECTED]>
http://www.tracerdigital.com
(614) 795-0501


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to