poleposters Posted October 22, 2008 Share Posted October 22, 2008 Hi, I have a pretty simple upload form. I haven't set an upload limit yet it fails for files ofa certain size? Is there something wrong with the script or my configuration? <?php if(isset($_POST['Submit'])) { if ($_FILES['picThumbnail']['name'] != "") { $name1="super"; $sUploadDir = 'uploadartwork/'; $sUploadedFile = $sUploadDir . basename($_FILES['picThumbnail']['name']); if (move_uploaded_file($_FILES['picThumbnail']['tmp_name'], $sUploadedFile)) { $sThumbnail = $_FILES['picThumbnail']['name']; $sThumbnail = $name1."_".$sThumbnail; $sFileName = strtolower(($sThumbnail)); if (file_exists(($sUploadDir.$_FILES['picThumbnail']['name']))) rename(($sUploadDir.$_FILES['picThumbnail']['name']), ($sUploadDir.$sFileName)); echo "file uploaded successfully"; } } phpinfo();}?> <table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form action="uploadartwork.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td><strong>Single File Upload </strong></td> </tr> <tr> <td>Select file <input name="picThumbnail" type="file" id="ufile" size="50" /></td> </tr> <tr> <td align="center"><input type="submit" name="Submit" value="Upload" /></td> </tr> </table> </td> </form> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/129561-file-upload-fails-for-large-files/ Share on other sites More sharing options...
feidakila Posted October 22, 2008 Share Posted October 22, 2008 You could use the html tag inside your <form></form> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> anyway check your php settings, I guess that the max upload file size is 2Mb Link to comment https://forums.phpfreaks.com/topic/129561-file-upload-fails-for-large-files/#findComment-671689 Share on other sites More sharing options...
poleposters Posted October 22, 2008 Author Share Posted October 22, 2008 I'm able to upload files up to around 20mb. But I need to be able to upload up to 100mb. I've looked at my phpinfo and can't see anything which specifically resembles a limit. What should I be looking for? Link to comment https://forums.phpfreaks.com/topic/129561-file-upload-fails-for-large-files/#findComment-671702 Share on other sites More sharing options...
PFMaBiSmAd Posted October 22, 2008 Share Posted October 22, 2008 Why not read the upload section in the php manual, it lists everything that affects an upload - http://us.php.net/manual/en/features.file-upload.common-pitfalls.php Link to comment https://forums.phpfreaks.com/topic/129561-file-upload-fails-for-large-files/#findComment-671744 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.