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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MtnBoardr
Forum Newbie
Posts: 2
Joined: Thu Jul 12, 2007 2:06 am

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

Post 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
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post 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.
User avatar
phpdevuk
Forum Contributor
Posts: 220
Joined: Mon Jul 04, 2005 5:31 am
Location: UK
Contact:

Post 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();
MtnBoardr
Forum Newbie
Posts: 2
Joined: Thu Jul 12, 2007 2:06 am

Post 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...
Post Reply