Alex-Grim Posted August 17, 2008 Share Posted August 17, 2008 I am hosting with GoDaddy and i had to throw a page together real quick so that a friend can upload videos to my server with a web interface because they are too large to send via email. The problem is that the page works fine for images and SMALL video files, but after 9MB it will not work any more? I called go daddy and they told me that there are default configuration limits, but that i am allowed to change them as i see fit, because they do not limit the size of the file that we can upload to our account, nor the execution time. They also provided me with this link: http://help.godaddy.com/article/1475? So i changed my config settings in the php.ini file that is in my webroot, and waited for about 20 minutes, and i still cannot upload anything larger than 9MB! Here are my settings with regards to file uploads: max_input_time = 900 max_execution_time = 900 memory_limit = 100M post_max_size = 90M upload_max_filesize = 80M I even confirmed this with this page here: http://us2.php.net/ini.core If you scroll down the page, you will come to this: post_max_size integer Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size . When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used. If the size of post data is greater than post_max_size, the $_POST and $_FILES superglobals are empty. This can be tracked in various ways, e.g. by passing the $_GET variable to the script processing the data, i.e. <form action="edit.php?processed=1">, and then checking if $_GET['processed'] is set. So it appears that i have my settings correct, but still, no luck. Any ideas? Thanx Also, there is NO input field for upload limit in the upload form, so i know that is not the problem. Quote Link to comment https://forums.phpfreaks.com/topic/120055-file-upload-problem/ Share on other sites More sharing options...
Alex-Grim Posted August 17, 2008 Author Share Posted August 17, 2008 I should also add that i have error_reporting set to E_ALL while i'm debugging. So the only error that i get with the large files is: Notice: Undefined index: pwd in /home/content/a/l/e/alexandergrim/html/tmp/Upload2.php on line 73 It is claiming that the password name/value pair/parameter was never sent over, but yet it does not do this if the file is less than 9M, because it IS an input field in the form, and works properly! This has me stumped. Here is the form: <form method="post" enctype="multipart/form-data" action="Upload2.php"> <label for="pwd">Enter your password that i gave you:</label> <br/> <input type="password" name="pwd" id="pwd"/> <br/><br/><br/> <label for="pwd">Now, choose a file to upload:</label> <br/> <input type="file" name="file" id="file"/> <br/><br/> <input type="submit" value="Upload"/> </form> and here is the script that parses it: <?php error_reporting(E_ALL); if ($_POST['pwd'] == "123") { if (move_uploaded_file($_FILES['file']['tmp_name'], $_FILES['file']['name'])){?> <h2 class="heading">Your file was uploaded successfully; <br/><br/> <a href="http://alexgrim.com/tmp/Upload.php">Do you want to upload another file?</a> </h2> <?} else {?> <h2 class="heading">Your file was NOT uploaded successfully!</h2> <br/> The file may have been too large. If so, you may have to find another way to get it to me. <br/><br/> <h2><a href="http://alexgrim.com/tmp/Upload.php">Do you want to try to upload again?</a></h2> <?} } else {?> <h2 class="heading">Your PASSWORD was NOT correct!</h2> <br/> Make sure that your are using the correct UPPERCASE or lowercase letters. For example, if the password is "Banannas" then "banannas" and "BANANNAS" are NOT correct, because it must be spelled EXACLTY like "Banannas". So go back and try to enter your password again. <br/><br/> <h2><a href="http://alexgrim.com/tmp/Upload.php">Do you want to try to upload again?</a></h2> <?} ?> Quote Link to comment https://forums.phpfreaks.com/topic/120055-file-upload-problem/#findComment-618445 Share on other sites More sharing options...
Alex-Grim Posted August 17, 2008 Author Share Posted August 17, 2008 Also, this script runs for 4-5 minutes before throwing an error, if that helps at all... Thanx again Quote Link to comment https://forums.phpfreaks.com/topic/120055-file-upload-problem/#findComment-618447 Share on other sites More sharing options...
Alex-Grim Posted August 17, 2008 Author Share Posted August 17, 2008 UPDATE, i have not been uploading a 9MB file, i have been only able to upload an 8MB file. I just now tried to upload a 9MB file, and i'm getting the same error, but only after 3 minutes now. When i try to upload a 15MB file, it errors after 4 minutes... Quote Link to comment https://forums.phpfreaks.com/topic/120055-file-upload-problem/#findComment-618451 Share on other sites More sharing options...
Alex-Grim Posted August 17, 2008 Author Share Posted August 17, 2008 Problem solved! I had to rename the php.ini file in my webroot to php5.ini Quote Link to comment https://forums.phpfreaks.com/topic/120055-file-upload-problem/#findComment-618459 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.