Vigilant Psyche Posted July 21, 2008 Share Posted July 21, 2008 phpinfo confirms that upload_max_filesize is set to 128M but uploads of over 2M seem to fail without throwing errors: echo "<tr><td class='content'> <span style='font-size:10px;'>(7z,gm6,gm7z,gmd,gmk,gml,png,jpeg, gif,jpg,mid,midi,pdf,psd,rar,swf,txt,zip)</span><br/><br/> <form action='index.php?body=upload' method='post' enctype='multipart/form-data'> <label for='file'>Filename:</label> <input type='file' name='file' id='file' /> <input type='submit' name='submit' value='Upload' /> </form>"; if ($_FILES["file"]["size"]!=0) { $types="7z,gm6,gm7z,gmd,gmk,gml,JPEG,GIF,JPG,PNG,jpeg,gif,jpg,mid,midi,pdf,png,psd,rar,swf,txt,zip,mp3"; $types=explode(",", ".".$types); $good=0; foreach($types as $ext) { $tmp = explode('.', $_FILES["file"]["name"]); $ext2 = $tmp[count($tmp)-1]; if($ext2 == $ext) { $good=1; } } if ($good==0) { echo "<span style='font-size:18;'>The type of file the you have attempted to upload isn't allowed. <br/>Please make sure the following are adhered to:</span><br/><br/> <img src='images/tick.png' style='vertical-align:middle;'> <span style='font-size:19;vertical-align:middle;text-align:right;'>We don't allow bitmap images (*.bmp). You must compress the file to .jpeg, .png or .gif.</span><br/><br/> <img src='images/tick.png' style='vertical-align:middle;'> <span style='font-size:19;vertical-align:middle;text-align:right;'>Only files on the above list are allowed.</span><br/><br/> <img src='images/tick.png' style='vertical-align:middle;'> <span style='font-size:19;vertical-align:middle;text-align:right;'>Executables, or web type files are not allowed, these must be compressed to .zip or .rar.</span><br/><br/><br/><br/>"; } else { if($_FILES["file"]["size"] < 7000000) { $file_clean=$_FILES["file"]["name"]; $file_clean=str_replace(" ","_",$file_clean); move_uploaded_file($_FILES["file"]["tmp_name"],"uploads/".cookie_name()."/".$file_clean); echo "File uploaded successfully.<br/><br/>"; } else echo("<table><tr><td style='vertical-align:top;'><img src='images/cross.png' ></td><td width=5></td><td><span style='font-size:19;vertical-align:top;text-align:right;color:white;'>The file is over the size limit.<br><br/>File size limit: 7mb. <br/>Your file size: ".($_FILES["file"]["size"]/1000000)." mb.<br/><br/>Try compressing the file further.</span></td></tr></table><br/><br/><br/>"); } } if ($handle = opendir('./uploads/'.cookie_name())) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "<div><div style='float:left;'><img src='uploaded.png' style='vertical-align:middle;'> <span style='font-size:20;vertical-align:middle;'><a href='/uploads/".cookie_name()."/".$file."'>".$file."</a></span></div> <div style='float:right;'><a href='index.php?body=upload&delete=$file'><image border='0' src='images/delete.png'></a></div></div><br/><br/>"; } } closedir($handle); } } cookie_name() is the persons username. Any ideas? Link to comment https://forums.phpfreaks.com/topic/115853-does-anyone-here-have-experience-with-large-file-uploads-failing/ Share on other sites More sharing options...
d3cl4n Posted July 21, 2008 Share Posted July 21, 2008 What exactly happens when it fails, does the page just timeout? Link to comment https://forums.phpfreaks.com/topic/115853-does-anyone-here-have-experience-with-large-file-uploads-failing/#findComment-595604 Share on other sites More sharing options...
Vigilant Psyche Posted July 21, 2008 Author Share Posted July 21, 2008 It takes the amount of time you would expect, throws no errors, and doesnt upload. I'm not really sure what timeout means. Link to comment https://forums.phpfreaks.com/topic/115853-does-anyone-here-have-experience-with-large-file-uploads-failing/#findComment-595606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.