themightydude Posted January 10, 2008 Share Posted January 10, 2008 I've read a few other topics here and google on this, but have been unable to find a solution. Here is the probelm, I have a script that allows a user to upload a file via php...they get to this script after they are logged in via .htaccess. Anyway, the script is fine in FireFox..I've uploaded 30MB files before....however in IE7 it times out. I can upload a 40KB file in IE, but a 89KB file times out. I am completely lost and have no idea. Server: RHEL5 PHP = 5.2.4 with Zend Optimizer V3.3.0 Apache is 2.2 HTML form Code: <form enctype="multipart/form-data" action="uploader.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="9000000000000000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br> <br /> <input type="submit" value="Upload File" /> </form> PHP Code: <?php // Where the file is going to be placed $target_path = "uploads/"; /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name']; $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } ?> Any insight / help that can be provided is greatly appreciated. Thanks! EDIT: THis script works in IE6, but not IE7. Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/ Share on other sites More sharing options...
cooldude832 Posted January 10, 2008 Share Posted January 10, 2008 on your second page type at the top print_r($_FILES); and see if you get an error to reference outta the manual Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435676 Share on other sites More sharing options...
themightydude Posted January 10, 2008 Author Share Posted January 10, 2008 I should of mentioned this before probably. When it times out in IE7, it takes me to a "Internet Explorer cannot display the webpage" I added the print_r($_FILES); to the top of my php file, but its the same thing.. "Internet Exploerer cannot display the webpage" Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435687 Share on other sites More sharing options...
cooldude832 Posted January 10, 2008 Share Posted January 10, 2008 does it give you a http response code, and what is the url saying? Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435689 Share on other sites More sharing options...
themightydude Posted January 10, 2008 Author Share Posted January 10, 2008 I get no response code. URL says http://mysite.com/uploader.php http://mysite.com/index.html is the main HTML page with the form that calls uploader.php via post. Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435695 Share on other sites More sharing options...
cooldude832 Posted January 10, 2008 Share Posted January 10, 2008 only thing I can think of is the MAX_FILE_SIZE is so huge that IE7 just says forget it and truncates it to 90 thousand bytes try removing it and see what happens Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435700 Share on other sites More sharing options...
themightydude Posted January 10, 2008 Author Share Posted January 10, 2008 I removed <input type="hidden" name="MAX_FILE_SIZE" value="9000000000000000" /> from the HTML code..but its still doing the same thing I ran the script again from firefox after adding the print_r command and this is what was returned: Array ( [uploadedfile] => Array ( [name] => Copy of B757 PARTS LIST IN STOCK-version 2.xls [type] => application/vnd.ms-excel [tmp_name] => /tmp/phpPxsDR9 [error] => 0 [size] => 160256 ) ) The file Copy of B757 PARTS LIST IN STOCK-version 2.xls has been uploaded Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435707 Share on other sites More sharing options...
cooldude832 Posted January 10, 2008 Share Posted January 10, 2008 well if IE ever gets to that second page and you can see an error that isn't 0 you can figure out what is error, but I think its IE7 browser having issue with the file, to test it have it process to itself and see if it at least goes without doing anythign Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435710 Share on other sites More sharing options...
themightydude Posted January 10, 2008 Author Share Posted January 10, 2008 Talking about going straight to the .php and skipping going through the html to get to the code? If so that does work, and I get: Array ( ) There was an error uploading the file, please try again! Its just anything larger than 40-50KB kills it What kills me, is that IE6 will work fine...its just IE7 Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435716 Share on other sites More sharing options...
cooldude832 Posted January 10, 2008 Share Posted January 10, 2008 no change the form action to $_SERVER['PHP_SELF'] and see if IE pushes it through or not. Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435719 Share on other sites More sharing options...
themightydude Posted January 10, 2008 Author Share Posted January 10, 2008 changed the form code to show this <form enctype="multipart/form-data" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> Then put the php code on the same page as the index file....but same thing. Firefox will upload the files, IE7 still times out..goes to a "IE cannot display the webpage". bah Quote Link to comment https://forums.phpfreaks.com/topic/85384-upload-script-times-out-in-ieworks-in-ff/#findComment-435743 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.