Page 1 of 1

Can't upload some images (HTTP upload via HTML Form)

Posted: Tue Oct 19, 2004 4:21 pm
by dashifen
http://www.nano-cemms.uiuc.edu/imgtest.php *SITE REMOVED, SORRY*

That site shows two images. One of a group of people that won't upload and one of me that does. The exact same form was used to upload both images and as you can see, they both appear to be jpgs with no issues. I uploaded the top image (the one that doesn't want to work in the form) but hand over FTP and it was fine.

However, when trying to upload that image using a an <input type="file"> field in a form, one of two things happens:
  1. In Internet Explorer, a "This Page Cannot be Displayed" page is shown.
  2. In Mozilla (& FireFox), you click the submit button and nothing happens.
Now, when #2 happened before, I realized that Mozilla & FireFox were not uploading images that exceeded the MAX_FILE_SIZE hidden field of the form. So, I increased that files size and those images worked fine. However, the files size of the top graphic on the page linked above is only 49791 bytes and the limit is currently set to 1MB for testing purposes.

This has also happened with GIF files. The jpeg on the page linked above is the first JPEG that has caused this problem.

Here is the form and the relevant fields:

Code: Select all

<form method="post" action="pro_enter_data.php" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input type="file" size="100" name="image_file" class="bodytext">
</form>
There are no error messages thrown when #2 happens above. The stop button lights for a moment, showing me that the browser is trying to do sometihng, and then it stops. The page is not reloaded, nor does the browser seem to travel to pro_enter_data.php as the action field of the form would have you believe.

Re: Can't upload some images (HTTP upload via HTML Form)

Posted: Tue Oct 19, 2004 4:24 pm
by dashifen
One other thing. I have checked php.ini and set the maximum uploaded file size in the runtime configuration as well.

Posted: Tue Oct 19, 2004 5:47 pm
by kettle_drum
Maybe the script times out, try adding:

Code: Select all

set_time_limit(0);

Posted: Tue Oct 19, 2004 10:39 pm
by feyd
can you post the code of the submission form?

side note: you can edit your posts.. you don't have to reply to them. :)