$php_mysql$ Posted August 3, 2011 Share Posted August 3, 2011 whenever i try to upload image of 1 to 6mb of size and try to resize it by using the image_resize.php i get this error Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 19008 bytes) in C:\wamp\www\nescript\image_resize.php on line 17 and on line 17 i see this $this->image = imagecreatefromjpeg($filename); what could be the reason? Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/ Share on other sites More sharing options...
darkfreaks Posted August 3, 2011 Share Posted August 3, 2011 try going into your php.ini file and changing the memory limit higher than 8MB. Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251267 Share on other sites More sharing options...
$php_mysql$ Posted August 4, 2011 Author Share Posted August 4, 2011 how much mb should i change it to kindly guide Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251627 Share on other sites More sharing options...
phpSensei Posted August 4, 2011 Share Posted August 4, 2011 <?PHPSensei To The Rescue Option 1:As darkfreaks mentioned, however this issue can be sometimes related to server restrictions. I know this from experience So What Can I Do Sensei? Just as Darkfreaks mentioned, you can access your php.ini files and change these settings. memory_limit = 32M upload_max_filesize = 4M post_max_size = 20M Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251629 Share on other sites More sharing options...
$php_mysql$ Posted August 4, 2011 Author Share Posted August 4, 2011 @phpSensei thanks soo much let my try after changing and will get back if im able to upload images larger than 10mb Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251636 Share on other sites More sharing options...
phpSensei Posted August 4, 2011 Share Posted August 4, 2011 No Problem, let us know. Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251637 Share on other sites More sharing options...
$php_mysql$ Posted August 4, 2011 Author Share Posted August 4, 2011 i did this memory_limit = 100M upload_max_filesize = 100M post_max_size = 100M and its working fine :-) is that ok? im not quiet sure for i only want users to be able to upload max 10mb image not more than that Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251644 Share on other sites More sharing options...
phpSensei Posted August 4, 2011 Share Posted August 4, 2011 You are good to go. just Mark the topic as solved. Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251645 Share on other sites More sharing options...
$php_mysql$ Posted August 4, 2011 Author Share Posted August 4, 2011 awesome :-) thanks soo much. Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251647 Share on other sites More sharing options...
phpSensei Posted August 4, 2011 Share Posted August 4, 2011 Np, I read your pm and replied. Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251658 Share on other sites More sharing options...
radiations3 Posted August 4, 2011 Share Posted August 4, 2011 can you paste your final code??? if so then kindly do... Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251813 Share on other sites More sharing options...
voip03 Posted August 4, 2011 Share Posted August 4, 2011 radiations3 check this link http://www.phpfreaks.com/forums/index.php?topic=339907.msg1602474#msg1602474 Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251843 Share on other sites More sharing options...
radiations3 Posted August 4, 2011 Share Posted August 4, 2011 radiations3 check this link http://www.phpfreaks.com/forums/index.php?topic=339907.msg1602474#msg1602474 thanx!!! Quote Link to comment https://forums.phpfreaks.com/topic/243709-error-in-resizing-image-with-image_resizephp/#findComment-1251894 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.