ForumGuy Posted August 18, 2006 Share Posted August 18, 2006 if all my parameters for a files upload are correct why doesn't it work?i have all the settings on ridiculous so the file can't be too big or be taking too long....but it still doesn't work?smaller files still work, i just don't grasp the madness of it all.....can someone please help me, PLEASE.i've searched everywhere and can't find anything new on the subject of making the file size acceptable larger, i've done everything i've been directed to do. ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/ Share on other sites More sharing options...
ober Posted August 18, 2006 Share Posted August 18, 2006 Alright, we're going to need a little more information.1) Can you modify the php.ini file?2) What is the size of the file you're trying to upload?3) What steps have you taken?4) Can you show us your code for the form and the processing of the upload?5) If the smaller files still work, are you printing out any debug code for the bigger files? Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-76773 Share on other sites More sharing options...
ForumGuy Posted August 18, 2006 Author Share Posted August 18, 2006 well basically....max_execution_time = 10000max_input_time = 10000memory_limit = 10000Mpost_max_size = 8000Mupload_max_filesize = 1000Mthe file i try to upload is 2,298kand it just seems to give no error and is empty...its like the file is too large for post_max_sizeany ideas?i will post my form if necesary? Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-76782 Share on other sites More sharing options...
craygo Posted August 18, 2006 Share Posted August 18, 2006 Yes code would be helpful. And did you make sure your file permissions were correct??Ray Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-76807 Share on other sites More sharing options...
wildteen88 Posted August 18, 2006 Share Posted August 18, 2006 Also when you changed the settings in the php.ini you did restart your server. If you dont restart your server the new PHP settings will not be loaded. Also I think 8000MB is a bit ott! But yeah please post the code so we can see Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-76839 Share on other sites More sharing options...
ForumGuy Posted August 22, 2006 Author Share Posted August 22, 2006 ok this is the code, hope it helps ;)[code]<?phpif(isset($_POST['Submit2'])){ $size = 75; // the thumbnail height $sizel = 300; // the image height $filedir = 'uploaded_images/'; // the directory for the original image $thumbdir = 'uploaded_images/thumbs/'; // the directory for the thumbnail image $prefix = 'thumb_'; // the prefix to be added to the original name $mode = '0666'; $userfile_name = $_FILES['image']['name']; $userfile_tmp = $_FILES['image']['tmp_name']; $userfile_size = $_FILES['image']['size']; $userfile_type = $_FILES['image']['type']; if (isset($_FILES['image']['name'])) { $prod_img = $filedir.$userfile_name; $prod_img_thumb = $thumbdir.$prefix.$userfile_name; move_uploaded_file($userfile_tmp, $prod_img); chmod ($prod_img, octdec($mode)); $sizes = getimagesize($prod_img); $aspect_ratio = $sizes[1]/$sizes[0]; //Image resizing if ($sizes[1] <= $size) { $height = $size; $width = abs($height/$aspect_ratio); }else{ $width = $sizes[0]; $height = $sizes[1]; } $destimg=ImageCreateTrueColor($width,$height) or die('Problem In Creating image'); $srcimg=ImageCreateFromJPEG($prod_img) or die('Problem In opening Source Image'); ImageCopyResampled($destimg, $srcimg, 0, 0, 0, 0, $width, $height, $sizes[0], $sizes[1]) or die('Problem In resampling'); ImageJPEG($destimg,$prod_img,75) or die('Problem In saving'); //Thumnail resizing if ($sizes[1] <= $size) { $new_width = $sizes[0]; $new_height = $sizes[1]; }else{ $new_height = $size; $new_width = abs($new_height/$aspect_ratio); } $destimg=ImageCreateTrueColor($new_width,$new_height) or die('Problem In Creating image'); $srcimg=ImageCreateFromJPEG($prod_img) or die('Problem In opening Source Image'); ImageCopyResized($destimg,$srcimg,0,0,0,0,$new_width,$new_height,ImageSX($srcimg),ImageSY($srcimg)) or die('Problem In resizing'); ImageJPEG($destimg,$prod_img_thumb,50) or die('Problem In saving'); imagedestroy($destimg); } $img_ad_id = $_POST['AdID']; echo " <table width='100%' border='0' cellspacing='1' cellpadding='6'> <tr> <td bgcolor='#FFFFFF'> <a href='".$prod_img."' target='_BLANK'> <img src='".$prod_img_thumb."' width='".$new_width."' height='".$new_height."'> </a><br /> click submit to proceed! <form name='form1' method='POST' action='".$editFormAction."'> <input type='hidden' name='AdPicThumb1' value='".$prod_img_thumb."' /> <input type='hidden' name='AdPic1' value='".$prod_img."' /> <input type='hidden' name='AdID' value='".$img_ad_id."' /> <input type='hidden' name='MM_update' value='form1'> <input type='Submit' name='Submit' value='Submit'> </form> </td> </tr> </table> ";}else{ echo " <table width='100%' border='0' cellspacing='1' cellpadding='6'> <tr> <td bgcolor='#FFFFFF'> <form name='form' method='POST' action='".$_SERVER['PHP_SELF']."' enctype='multipart/form-data'> <input type='file' name='image' size='65'><br /> <input type='hidden' name='AdID' value='".$_GET['AdID']."' /> <input type='Submit' name='Submit2' value='Submit'><br /> </form> </td> </tr> </table> ";}?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-78539 Share on other sites More sharing options...
ForumGuy Posted August 24, 2006 Author Share Posted August 24, 2006 i posted the code like asked....plz help... ???is there anything else that could restrict the size of the file that i'm uploading? :-\ :'( Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-79804 Share on other sites More sharing options...
ForumGuy Posted August 31, 2006 Author Share Posted August 31, 2006 hey wildteen88,Craygo theres the code you wanted, can you help or not??? Quote Link to comment https://forums.phpfreaks.com/topic/17949-ok-so-tell-me-this/#findComment-83394 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.