![]() |
Memory Exhausted when trying to resize - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Memory Exhausted when trying to resize (/showthread.php?tid=40048) |
Memory Exhausted when trying to resize - El Forum - 03-28-2011 [eluser]metamorpher[/eluser] I know this is an error for my server only, but I already modified my php.ini and assigned 512MB of the memory to process scripts, so I don't know why I have this problem, when for example I can process larger images (file size and image size) with such a blog tool like wordpress using just 8MB. So, in detail, I put first the error Code: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1280 bytes) in Now, How I do the upload: Code: $up_config['file_name'] = time(); and here's the thumbnail generator: Code: function generate_thumbnail($img_path_file, $size) The max size it can process is like 600 px per 600 px As I said, don't know why... I haven't had this problem with other scripts nor prior frameworks... I just moved to CI 2... Formerly I was using CI 1.7. Can you help me at all? Thank you in advance fellas ![]() Memory Exhausted when trying to resize - El Forum - 03-28-2011 [eluser]metamorpher[/eluser] Well I figured out what the problem was. I just had to call the clear function after the get_image_properties function. That's it.. so if you have the same problem, you can know how to solve it: Here's the final sketch of the generate_thumbnail function: Code: function generate_thumbnail($img_path_file, $size) Memory Exhausted when trying to resize - El Forum - 03-28-2011 [eluser]InsiteFX[/eluser] You can also add more memory in php.ini InsiteFX Memory Exhausted when trying to resize - El Forum - 03-28-2011 [eluser]metamorpher[/eluser] As I told in the start on the topic, I already gave 512 MB of memory to the script compiler... Don't you think is crazy to keep giving it more? I don't know how hosting companies work with cloud computing, but my purpose is completely for development, not for production. Memory Exhausted when trying to resize - El Forum - 07-29-2011 [eluser]Drew J[/eluser] I'm having this problem also. I'm giving PHP 96MB to work with... I'm uploading a 5MB JPG and it gives me a fatal error trying to allocate over 100MB. I've included $this->image_lib->clear(); after any resize I do. Anyone else have any more experience with this? Memory Exhausted when trying to resize - El Forum - 08-01-2011 [eluser]walletwallet[/eluser] i dong't know how to used this forum |