Page 1 of 1

uploading...ie6/firefox work, but ie7 doesnt???

Posted: Thu Jul 12, 2007 2:09 am
by MtnBoardr
Hello All,

I'm having some issues with move_uploaded_file() and internet explorer 7. In ie6 and the latest version of firefox, I can upload images to my site of varying file size (up until the max_file_size), and my script works as expected. However, in ie7 the page quickly timeouts if the image is larger than around 200kb or so. I get the following standard error page:

"Internet Explorer cannot display the webpage" etc

Has anyone else experienced a similar issue? or has any ideas? I've tried looking on Google and didnt find any info.


It seems to be timing out when its trying to reach the page indicated by the upload form's action attribute, not when the image is uploading. Here are some useful phpinfo() variables:

max_execution_time 30
max_input_time -1
upload_max_filesize 2M
post_max_size 8M


I'm not sure of Apache's value for LimitRequestBody directive because it was set by my host. However, if this was really a php/apache configuration issue, then wouldn't ie6 and firefox be affected as well???


Ahh please help!


Thanks,

Andrew

Posted: Thu Jul 12, 2007 2:53 am
by miro_igov
move_uploaded_file() is server side function - it's work does not depend on the browser. I believe you have some error in the code. Posting it here may help.

Posted: Thu Jul 12, 2007 3:52 am
by phpdevuk
you might want to try adding the field <input name="MAX_FILE_SIZE" value="1048576" type="hidden"/> to your upload form, it specifies a maximum file size in bytes, the fact that your page timesout in ie7 is odd might be worth putting something like this on upload script

Code: Select all

echo $_FILES['myFile']['error'];
exit();

Posted: Thu Jul 12, 2007 9:52 am
by MtnBoardr
thanks for the posts but i don't think its worth posting the code here because it times out well before it reaches the upload script. It basically times out while trying to reach the page specified in the form's action, it never executes any code on that page... =(

oh and i do have that hidden field already...