I've just moved my scripts from one hosting account to another.
The script works well in the old one, but not the new one.
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20400 bytes) in /home/maruiorg/public_html/thumbnail.php on line 7
$img = imagecreatefromjpeg($fn);
I don't understand why 20400 bytes cannot be allocated from 33554432 bytes...
Please help :(
It's not saying 33554432 bytes are all free, that is just the total allowed, other parts of your script will be chewing on it as well. When you call imgcreate there is less than 20400 bytes free.
The problem is solved by adding this line to .htaccess
php_value memory_limit 192M
It seems that PHP's error message is not correct (about the numbers)
Oh... I understand now... Thanks
Originally Posted by hash
Whoa. Are you doing resize on the fly? Wonder, how long this server will stay alive o_O
Originally Posted by Shrapnel_N5
because the source picture is quite big, i am considering that, after creating the thumbnail, the thumbnail will be saved and record the creation in database.