Distant_storm Posted December 13, 2007 Share Posted December 13, 2007 I have been having problems with my image stuff... Ok heres what my system does... Uploads image.. resizes and saves,gets rid of gd image stuff, addswatermark and saves, gets rid of unwanted gd image data, saves However my upload is set to 2M. However I don't think this is the issue. If I upload an image that is only 1.1 mb i get this error message. Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 2816 bytes) in /XXX/XXX/XXXX.php on line 89 Line 89 onward is ... $file_allocation= ".." . $base_url_temp . "/" . $_FILES['photofile']['name']; $file_allocation_new = ".." . $base_url_temp . "/1" . $_FILES['photofile']['name'] ; switch ($file_type) { case "jpg": $src = imagecreatefromjpeg($file_allocation); break; case "gif": $src = imagecreatefromGif($file_allocation); break; case "png": $src = imagecreatefromPng($file_allocation); break; } Would it help if i put parts of the script into a new script ? Or do i need to do something else? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 Maybe change the memory size limit ini_set("memory_limit","12M"); // Modify this to your own likes Quote Link to comment Share on other sites More sharing options...
Distant_storm Posted December 13, 2007 Author Share Posted December 13, 2007 I still get an error even when i have increased allowed memory size of 12582912 bytes exhausted (tried to allocate 11264 bytes) so the memory size is bigger then what its trying to allocate ? do i need to increase something else ? Quote Link to comment Share on other sites More sharing options...
Distant_storm Posted December 13, 2007 Author Share Posted December 13, 2007 bump Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 13, 2007 Share Posted December 13, 2007 I found this dude with the same problem, and he got it fixed. http://www.icyphoenix.com/viewtopic.php?t=487 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.