surferboy Posted December 26, 2012 Share Posted December 26, 2012 (edited) Hey - This is my first post but certainly not a noob to Invision Power board forums. Did search extensively for an answer to my question but could not find anything. When I attempt to upload an image to a product, the form says max file is 0.12MB. It certainly holds to that. My php.ini file is set at 128mb so that's not an issue. I have changed the settings in Preferences -> Images -> Product Images and still the upload page says 0.12MB. I have also set the Administration -> Preferences -> Upload Quota -> image value upload limit to 2mb and still, the upload page for a products says 0.12MB What gives? I am using the default skin for 1.5.2. I upgraded from 1.4.9 using the auto upgrader. Thanks for any thoughts or ideas. Brian [edit] okay, now it says max upload is 1.91 mb. strange why the delay? Edited December 26, 2012 by surferboy (see edit history) Link to comment Share on other sites More sharing options...
joseantgv Posted February 24, 2013 Share Posted February 24, 2013 Same problem.. Link to comment Share on other sites More sharing options...
JosefPrado Posted March 2, 2013 Share Posted March 2, 2013 Same issue here, cant find solution.... Anyone with luck? Link to comment Share on other sites More sharing options...
JosefPrado Posted March 2, 2013 Share Posted March 2, 2013 Found a manual solution: Run that on your SQL: UPDATE `your_db_name`.`ps_configuration` SET `value` = '2097152' WHERE `ps_configuration`.`id_configuration` =33; This will change it to 2 Mb (raise or reduce as much as you want) You should be able to change it under "Preferences -> Images", but for some reason its not saving it on the DB when you select Save. 4 Link to comment Share on other sites More sharing options...
sadlyblue Posted May 3, 2013 Share Posted May 3, 2013 Thanks, this solved it. Wonder if this bug still persist in newer versions, i'm using 1.5.2 Link to comment Share on other sites More sharing options...
jvicente Posted January 6, 2015 Share Posted January 6, 2015 Same problem UNSOLVED here. I've just upgraded to ps 1.6.0.9 and I have almost 5000 products. When I try to upload images the bigger ones report error. So to test it I resize one of the images to half size. So original size was: 3.22Mb and 3744 x 5616 pixels (got error in upload) Half size 976kb and 1872 x 2808 pixels went fine In backoffice I changed the preferences/images Maximum size to 5000000 bytes max weight and lenght to 5000 both (pixels) I double checked the database and the values changed inside it so what's wrong??? Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 Same problem UNSOLVED here. I've just upgraded to ps 1.6.0.9 and I have almost 5000 products. When I try to upload images the bigger ones report error. So to test it I resize one of the images to half size. So original size was: 3.22Mb and 3744 x 5616 pixels (got error in upload) Half size 976kb and 1872 x 2808 pixels went fine In backoffice I changed the preferences/images Maximum size to 5000000 bytes max weight and lenght to 5000 both (pixels) I double checked the database and the values changed inside it so what's wrong??? check you php.ini value for upload_max_filesize (edited as I had wrong field to check) you can use my free module to check all php.ini and runtime http://www.prestashop.com/forums/topic/278164-free-module-display-php-environment-phpinfo-back-office/ Link to comment Share on other sites More sharing options...
jvicente Posted January 6, 2015 Share Posted January 6, 2015 (edited) check you php.ini value for max_file_uploads you can use my free module to check all php.ini and runtime http://www.prestashop.com/forums/topic/278164-free-module-display-php-environment-phpinfo-back-office/ Ok, but I upgraded from 1.5.6 to 1.6 and before the images were uploading fine....so, do you think it's a matter of php.ini configurations? I installed your module and got this information: max_execution_time 300 max_file_uploads 20 max_input_nesting_level 64 max_input_time 300 max_input_vars 10000 memory_limit 128M Edited January 6, 2015 by jvicente (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 my bad, could you please check value for upload_max_filesize Link to comment Share on other sites More sharing options...
jvicente Posted January 6, 2015 Share Posted January 6, 2015 my bad, could you please check value for upload_max_filesize upload_max_filesize64M Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 earlier you mentioned an error message for the larger images, what is the exact message? Link to comment Share on other sites More sharing options...
jvicente Posted January 6, 2015 Share Posted January 6, 2015 earlier you mentioned an error message for the larger images, what is the exact message? yess, my message was: ""I've just upgraded to ps 1.6.0.9 and I have almost 5000 products. When I try to upload images the bigger ones report error. So to test it I resize one of the images to half size. So original size was: 3.22Mb and 3744 x 5616 pixels (got error in upload) Half size 976kb and 1872 x 2808 pixels went fine In backoffice I changed the preferences/images Maximum size to 5000000 bytes max weight and lenght to 5000 both (pixels) I double checked the database and the values changed inside it so what's wrong???"" Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 no the exact error message, so I can isolate the code issuing the error message. what I noticed in the code is that it will use the smallest value from post_max_size or upload_max_filesize check that post_max_size is larger than image size from classes/Tool.php public static function getMaxUploadSize($max_size = 0) { $post_max_size = Tools::convertBytes(ini_get('post_max_size')); $upload_max_filesize = Tools::convertBytes(ini_get('upload_max_filesize')); if ($max_size > 0) $result = min($post_max_size, $upload_max_filesize, $max_size); else $result = min($post_max_size, $upload_max_filesize); return $result; } Link to comment Share on other sites More sharing options...
jvicente Posted January 6, 2015 Share Posted January 6, 2015 no the exact error message, so I can isolate the code issuing the error message. what I noticed in the code is that it will use the smallest value from post_max_size or upload_max_filesize check that post_max_size is larger than image size from classes/Tool.php public static function getMaxUploadSize($max_size = 0) { $post_max_size = Tools::convertBytes(ini_get('post_max_size')); $upload_max_filesize = Tools::convertBytes(ini_get('upload_max_filesize')); if ($max_size > 0) $result = min($post_max_size, $upload_max_filesize, $max_size); else $result = min($post_max_size, $upload_max_filesize); return $result; } About post_max_size or upload_max_filesize they are both above filesize. I tried to upload the big file again and the error was: 7320.jpg : An error occurred while copying image, check your memory limit. 1 Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 try memory of 256mb. here is where error comes from, during resize public static function checkImageMemoryLimit($image) { $infos = @getimagesize($image); $memory_limit = Tools::getMemoryLimit(); // memory_limit == -1 => unlimited memory if (function_exists('memory_get_usage') && (int)$memory_limit != -1) { $current_memory = memory_get_usage(); $channel = isset($infos['channels']) ? ($infos['channels'] / 8) : 1; // Evaluate the memory required to resize the image: if it's too much, you can't resize it. if (($infos[0] * $infos[1] * $infos['bits'] * $channel + pow(2, 16)) * 1.8 + $current_memory > $memory_limit - 1024 * 1024) return false; } Link to comment Share on other sites More sharing options...
wer_ru Posted March 2, 2015 Share Posted March 2, 2015 (edited) i confirm problem with the memory you need to edit your php.ini or .htaccess php_value upload_max_filesize 32M php_value post_max_size 32M php_value memory_limit 128M #or bigger Edited March 2, 2015 by wer_ru (see edit history) Link to comment Share on other sites More sharing options...
benwiggy Posted June 17, 2017 Share Posted June 17, 2017 (edited) Can someone tell me where the php.ini file is? I've also got this error about memory limit when uploading images. Is there a setting somewhere in the BackOffice for image filesize? Thanks Edited June 17, 2017 by benwiggy (see edit history) Link to comment Share on other sites More sharing options...
grsinternet Posted April 8, 2021 Share Posted April 8, 2021 In Prestashop 1.7 there are additional limits in PS back-office: Advanced Parameters -> Administration -> Upload Quota 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now