Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Can't upload files over 1MB
01-29-2010, 05:45 AM #1
- Join Date
- Jan 2010
- Thanked 0 Times in 0 Posts
Can't upload files over 1MB
My site is hosted by 1and1.com though a business package, so I don't own the server, or have it locally.
I'm using the following simple php upload code which will be used for uploading rather long sound files (30-60mb) to my server:
<form enctype="multipart/form-data" id="sermonadd" action="submit.php" method="post"> <input name="uploaded" type="file"> <input type="submit"> </form>
$target = "sermons/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
echo "Sorry, there was a problem uploading your file.";
I tried the code on another server, and it worked there just fine- over or under 1MB
I also tried using other php upload codes, including one that works via ftp - still the same issue (although with that one, it just creates a file with the right name on the server that is 0k if it's over 1MB...again if it's under, it uploads just fine).
I know I can upload files to the server via ftp over 1MB - I've done it through filezilla many times.
After all this, I figured the only explanation is that it's a server-side php error. Obviously there's no ftp limit, it works fine on my other server, I tried it in several browsers, on several different computers and with several different upload codes- all which yielded no improvement.
My host allows local changes to the php.ini file by placing a file including the overrides in the affected directory as php.ini
suspecting it could be the upload_max_filesize or the post_max_size, I changed both of those to 100MB and also changed the memory_limit to -1 just in case.
I verified these changes were working with phpinfo() , but unfortunately the problem is still there- I still cannot upload any files over 1MB.
Trying to contact the host has been a nightmare- both over the phone and email. They haven't a clue what I'm talking about and insist it must be a coding error.
Does anyone have any clue whats causing this 1MB limit? I've tried EVERYTHING I can possibly think to do and I'm at a standstill.
I tried to be thorough, but if you need any more information- just ask.
Thanks in advance!
01-29-2010, 05:58 AM #2
- Join Date
- Jul 2009
- South Yorkshire, England
- Thanked 304 Times in 303 Posts