Jump to content

Image resizing


timlondon

Recommended Posts

 

As far as I know GD should be fine with that - however PHP it's self might be the cause of your problems. PHP is only allowed so much RAM per page request. You might need up to 6MB to process a 2MB image, and yet your PHP memory_limit could be set to only 4MB.

 

http://us.php.net/manual/en/ini.core.php#ini.memory-limit

Link to comment
https://forums.phpfreaks.com/topic/93128-image-resizing/#findComment-477150
Share on other sites

I've increased the memory_limit to 128 but the problems still there.

 

I think i've isolated the problem to a copy failure.

 

$newname="../../mbr/".$fl."/".$detail[0]."/Imagetmp/".$image_name;

$copied = copy($_FILES['image']['tmp_name'], $newname);

if (!$copied)

{

echo 'Copy failed!';

exit;

}

 

The above works fine when uploading images under 2mb. But any image over 2mb gets a coy failure.

Link to comment
https://forums.phpfreaks.com/topic/93128-image-resizing/#findComment-478289
Share on other sites

Archived

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

×
×
  • Create New...

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.