Jump to content

Failure when uploading large files


Rheves

Recommended Posts

<form enctype=\"multipart/form-data\" action=\"./ProcessUpload.php\" method=\"POST\">
        Upload this file: <input name=\"userfile\" type=\"file\" />
        <input type=\"submit\" value=\"Upload File\" />
        </form>

 

That's the code I have for uploading files, it works fine for uploading small files but I'm unable to upload large ones. I'm trying to upload a 22MB PDF file but even after removing the MAX_FILE_SIZE limit(Which was high enough before) the file information still doesn't make it to the processupload page. I get the error that the variable 'userfile', from $_FILES['userfile']['name'] doesn't exist.

 

Can anyone help me out here?

Link to comment
Share on other sites

Somewhat unrelated, but like how do you limit uploading files that exceed the max? There's no way to test its size until it's uploaded... and HTML stuff isn't very reliable, so what's the solution other than letting it bomb and handle the error?

 

On another note did you try changing the max execution time? What is the error you are getting?

Link to comment
Share on other sites

I've had max execution time errors before and this isn't one of them. The error I get is that  'userfile' in basename($_FILES['userfile']['name'] or basename($_FILES['userfile']['tmp_name'] etc. isn't recognized, the same effect as going to ProcessUpload.php directly instead of through the upload form.

 

As for limiting files that exceed the max, only a select group have access to the upload form, so anything uploaded will be necessary. (I'm assuming you mean huge file abuses or something like that from the public, correct me if I'm wrong here)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.