Jump to content

Archived

This topic is now archived and is closed to further replies.

ForumGuy

ok so tell me this....

Recommended Posts

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.

??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ???

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
well basically....

max_execution_time = 10000

max_input_time = 10000

memory_limit = 10000M

post_max_size = 8000M

upload_max_filesize = 1000M


the file i try to upload is 2,298k

and it just seems to give no error and is empty...its like the file is too large for post_max_size

any ideas?

i will post my form if necesary?

Share this post


Link to post
Share on other sites
Yes code would be helpful. And did you make sure your file permissions were correct??
Ray

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
ok this is the code, hope it helps  ;)

[code]<?php

if(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]

Share this post


Link to post
Share on other sites
i posted the code like asked....plz help... ???

is there anything else that could restrict the size of the file that i'm uploading?

:-\ :'(

Share this post


Link to post
Share on other sites

×

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.