Has anyone else experience of imagecreatefrom jpeg failing with an error
message about memory even though the size of the image being uploaded is
nothing like the space available to the script?
Is imagecreatefrom jpeg particularly memory hungry?
Immediately prior to the failure memory is given as 2405072
The jpeg being uploaded is 812201 in size
Smaller jpegs work fine. jpegs created by different means all seem to fail
if the size is around 500k plus.
Error message is
Fatal error: Allowed memory size of 16777216 bytes exhausted at (null):0
(tried to allocate 3264 bytes) in
/home/virtual/site216/fst/var/www/html/mv/private/mvaddinfoinc.ph p on line
1997
PHP version is 4.3.3 on a shared server
GD version is bundled (2.0.15 compatible)
Memory limit is set to 16M
Max upload is set to 16M
if (function_exist s('memory_get_u sage')) {
$mem_in_use= memory_get_usag e();
}
else {
$mem_in_use="me mory usage indeterminable" ;
}
dev_echo("memor y usage= $mem_in_use" );
$src_img = imagecreatefrom jpeg("$temp_ful lpicname");
if (!$src_img) {
$GLOBALS[InfoMsg]->MsgAdd("Coul d not create image from jpeg");
unlink ( $temp_fullpicna me);
return false;
}