Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Large file uploads failing quietly

Status
Not open for further replies.

OsakaWebbie

Programmer
Feb 11, 2003
628
JP
I have a form that includes <input name=audiofile type=file...>. In my action script, I check "if (is_uploaded_file($_FILES['audiofile']['tmp_name']))" and then copy the file and set other things in my database. The files I want to upload range in size from about 1MB to 3MB. Under about 2MB, they upload fine, but over that (I don't know the exact cutoff - I haven't done a scientific study), the form submission still takes several seconds (so apparently the file is being sent), but when it gets to my action script, the is_uploaded_file check returns false. I do not have MAX_FILE_SIZE set (I expect someone would ask that) - I previously had it set to 3MB, but I removed it when I ran into this problem, just stabbing in the dark, but it appears to be unrelated. Is there some sort of timeout that I might be running into or something?
 
Instead of removing MAX_FILE_SIZE, try setting it to a higher number. It may well be that there is a default value if you specify none.

That aside, I'd ask in the forum for whatever system you're upload using / to (ActionScript == Flash back-end?)

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
I already tried raising MAX_FILE_SIZE to 4MB before I removed it altogether.

I'd ask in the forum for whatever system you're upload using / to
I don't know which system you mean. There is no flash involved. I am uploading MP3 files, and my code (PHP) simply copies them to a directory and updates my database so that I know there is an audio file there. The server is Apache, and this failure happens in both Firefox and IE. When I said "action script", I was simply referring to the PHP file that the form references in <form action=mycode.php>. I'll be happy to ask in the PHP forum, but I don't think it's a PHP language question, but more fundamental.
 
PHP is what you're using to upload the files, not HTML. That's why BRPS hinted that you should ask your question in the forum for the server-side language you're using.

Lee
 
I was confused by the words "upload using / to" and his parenthetical comment about flash - I thought I had confused him by my term "action script". Okay, I'll ask this in the PHP forum - thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top