I'm currently working on a CGI file upload script, and, as a new programmer, am running into a problem I can't seem to fix. Really, the problem may or may not be perl related, but I figure someone here may know the answer. The problem is that when I select a file to upload on my file upload HTML page, and click "submit" to send the file to my CGI, the browser sits for a few minutes, and then crashes (IE = "DNS error"). I put the following lines in the beginning of my code for debugging purposes:
if ($query->param("Submit")){
die;
}
When I submit a file, the program never reaches these lines (the program never dies). However if I goto the url "newimage.cgi?Submit=test", the program promptly dies. I'm using HTML templates, but the same problem occurs when I use static HTML. Below is the HTML code:
<form name="upload" method="post" action="newimage.cgi" enctype="mult
+ipart/form-data">
<table border="0" cellpadding="0" cellspacing="0">
<tr><td height="50">
</td></tr>
<tr>
<td colspan="2"> File:
<input type="file" name="file" size="40">
</td>
</tr>
<tr><td colspan="2">
<input type="submit" name="Submit" value="Add Image">
<input type="reset" name="Reset" value="Reset">
</td></tr>
<tr><td colspan="2">
<font color="#CC0000" size="-1"></font>
</td></tr>
</table>
</form>
I didn't include my CGI program because I don't feel that the code is the problem. Thanks for any help you can provide.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.