PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > General Issues / Questions
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
Old 7-10-12, 07:00 PM   #1
audiomason
Registered
 
Join Date: Aug 2008
Location: Oakland, CA
Posts: 5
Reputation: 0
File uploads over 12.5M fail with Internal Server Error 500

Hi there,

I have a very simple page with a form that let's you choose and upload a file:
Code:
<form action="index.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /><br /> <input type="submit" name="submit" value="Submit" /> </form>
Then there's some very simple php to move the uploaded file to a folder:
Code:
move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
The problem is the code works fine for files under 12.5M, anything bigger returns a 500 error.

I've checked the settings in the php.ini file, and they're set for a max file size of 20M. I've also checked the cgi logs, and have gotten no errors for this page.

Has anyone else run into this problem?

I created a test page, if anyone wants to see what I'm talking about:
http://www.audiomason.com/uptest/

Thanks,
Drew
audiomason is offline   Reply With Quote
Old 7-10-12, 09:25 PM   #2
tpoynton
Custom User Title
 
tpoynton's Avatar
 
Join Date: Sep 2004
Location: Mass
Posts: 2,119
Reputation: 293
While I have not heard about it in a while, there used to be a 60 second timeout on any scripts; how long does it take for the file to upload?

in looking at your page, it is unlikely it is timing out. I'd venture a guess that it is a limit on uploads of greater than 12.5 mb that overrides anything you have in php.ini - but you might want to contact support to see if it is something they could remove for your account, assuming what you are doing is within the acceptable limits/terms of use.
tpoynton is offline   Reply With Quote
Old 7-11-12, 12:15 AM   #3
entrecon
Custom User Title
 
entrecon's Avatar
 
Join Date: Aug 2006
Location: Michigan
Posts: 2,669
Reputation: 337
I remember the timeout issue too. I just attempted to upload a pretty large file (156 megs) and I am sure I am past the 90 second mark...by a lot...waiting to see the final outcome.

This ran a LONG time and then bombed, doesn't seem like a time-out issue.
__________________
________________________________
Find me on twitter: @entrecon
entrecon is offline   Reply With Quote
Old 7-11-12, 08:59 AM   #4
tpoynton
Custom User Title
 
tpoynton's Avatar
 
Join Date: Sep 2004
Location: Mass
Posts: 2,119
Reputation: 293
perhaps they quietly got rid of the 60 second timeout? I have to say I have not gotten complaints about timing out in a LONG time, like at least a year. I attributed it to my website users having better connections though
tpoynton is offline   Reply With Quote
Old 7-11-12, 11:58 AM   #5
audiomason
Registered
 
Join Date: Aug 2008
Location: Oakland, CA
Posts: 5
Reputation: 0
I've been talking with support, and they insist that the error is being caused by the 60 second timeout. I just wrote back to them explaining how unlikely that is given that I can upload a 12.499 MB file in 34 seconds with no problems, but when I try to upload a 12.5 MB file I get an internal server error. My suspicion is that the LimitRequestBody Apache directive is set at 12.5 MB, I've asked them to verify this, and will let you all know what they say.

Thanks for helping me look into this.
audiomason is offline   Reply With Quote
Old 7-11-12, 04:48 PM   #6
audiomason
Registered
 
Join Date: Aug 2008
Location: Oakland, CA
Posts: 5
Reputation: 0
Support got back to me and said they filed a bug report with the engineering team and would contact me when the issue has been resolved... Hurry up and wait!
audiomason is offline   Reply With Quote
Old 7-11-12, 06:42 PM   #7
IanS
Former Spam Filter (EU)
 
IanS's Avatar
 
Join Date: Mar 2004
Location: Washington (THE original UK one!)
Posts: 12,805
Reputation: 470
Well at least they think it is a bug so you 'should' be able to upload in the future. If you're keen to get the file uploaded try using FTP this time until the bug is 'fixed'. (You may have a long wait whilst the quality test any bug fix!)
__________________
This is a Powweb customer
helping Powweb customer forum.

I am a customer just like you!!

Some matters can only be answered by staff or support.
Give it a go - ask here first!
IanS is offline   Reply With Quote
Old 7-11-12, 07:29 PM   #8
audiomason
Registered
 
Join Date: Aug 2008
Location: Oakland, CA
Posts: 5
Reputation: 0
Quote:
Originally Posted by IanS View Post
If you're keen to get the file uploaded try using FTP this time until the bug is 'fixed'.
That's what I end up doing. The idea of the particular site I'm working on, though, is to let other users upload files, and these particular users aren't to savvy with FTP, if you know what I mean.
audiomason is offline   Reply With Quote
Old 7-12-12, 10:36 AM   #9
entrecon
Custom User Title
 
entrecon's Avatar
 
Join Date: Aug 2006
Location: Michigan
Posts: 2,669
Reputation: 337
Always keep in mind that if you are allowing other users to upload files, you are responsible for whatever is there. If you don't moderate the posts you could be in for some trouble.
__________________
________________________________
Find me on twitter: @entrecon
entrecon is offline   Reply With Quote
Old 7-12-12, 01:54 PM   #10
audiomason
Registered
 
Join Date: Aug 2008
Location: Oakland, CA
Posts: 5
Reputation: 0
Quote:
Originally Posted by entrecon View Post
Always keep in mind that if you are allowing other users to upload files, you are responsible for whatever is there. If you don't moderate the posts you could be in for some trouble.
Good point
Only trusted users are given access to the actual site. On the test page linked above the files are deleted immediately after a record of the upload is stored in a db.
audiomason is offline   Reply With Quote
Old 7-13-12, 08:33 AM   #11
Croc Hunter
Mod.. with bite..
 
Croc Hunter's Avatar
 
Join Date: Sep 2002
Location: Australia
Posts: 7,295
Reputation: 442
Some Powweb limits are hard limits. No matter if you set 20Mb or 200Mb in php.ini anything over 10Mb will fail with a one run script.
__________________
Croc Hunter MSC :
Croc Hunter is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:13 AM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright © 2000-2007 Jelsoft Enterprises Limited.