![]() |
image resize - memory exhausted - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: image resize - memory exhausted (/showthread.php?tid=5240) |
image resize - memory exhausted - El Forum - 01-13-2008 [eluser]velti[/eluser] hi, i want to resize images which where uploaded. I used this function in another website i coded completely by myself and all worked fine with jpg pictures up to 1MB yesterday i used nearly the same function in a CI controller and files with 200kb+ caused a memory exhaust. Code: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 10240 bytes) in /Applications/MAMP/htdocs/projekte/hph/system/helpers/image_helper.php on line 80 Quote:function ImageResize($sourcefile, $thumbziel, $new_w, $logo = NULL) { what can i do to fix this? btw.: the same occurs with the image_lib->resize function. image resize - memory exhausted - El Forum - 01-13-2008 [eluser]Michael Wales[/eluser] That indicates that your scripts needed more memory than PHP was allowed to give it. Increase PHP's memory limit, either by adding: Quote: * memory_limit = 12M to your php.ini file (recommended, if you have access) Some hosts allow a PHP.ini in the root of your site. image resize - memory exhausted - El Forum - 01-13-2008 [eluser]velti[/eluser] ini_set('memory_limit... is not callable on every host, right? but it works, thanks for the help. |