Rheves Posted September 18, 2007 Share Posted September 18, 2007 <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? Quote Link to comment https://forums.phpfreaks.com/topic/69731-failure-when-uploading-large-files/ Share on other sites More sharing options...
asparagus Posted September 18, 2007 Share Posted September 18, 2007 As far as I know, the MAX_FILE SIZE only limits the size of files sent from the browser. Your PHP configuration file also has its own restriction on size, which may be limiting the size. Quote Link to comment https://forums.phpfreaks.com/topic/69731-failure-when-uploading-large-files/#findComment-350459 Share on other sites More sharing options...
Rheves Posted September 18, 2007 Author Share Posted September 18, 2007 I changed the upload_max_filesize to 50MB in php.ini but am still having the same problem. Quote Link to comment https://forums.phpfreaks.com/topic/69731-failure-when-uploading-large-files/#findComment-350564 Share on other sites More sharing options...
dbo Posted September 18, 2007 Share Posted September 18, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/69731-failure-when-uploading-large-files/#findComment-350570 Share on other sites More sharing options...
Rheves Posted September 18, 2007 Author Share Posted September 18, 2007 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) Quote Link to comment https://forums.phpfreaks.com/topic/69731-failure-when-uploading-large-files/#findComment-350586 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.