floriano Posted April 19, 2014 Share Posted April 19, 2014 (edited) Hi, I tried to upload a virtual server product size products: 33,2 MB but it is not possible, why? Detail my server VPS: Server information: Linux #1 SMP Mon Jul 1 20:48:07 MSK 2013 x86_64 Server software version: Apache PHP version: 5.3.3 Memory limit: 128M Max execution time: 60 Upload max filesize: 128M Max file uploads: 20 Database information MySQL version: 5.1.73 MySQL engine: MyISAM Store information PrestaShop version: 1.5.4.1 Current theme in use: default Your information Your web browser: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Check your configuration Required parameters: OK Optional parameters: OK thanks in advance for any help! Edited April 19, 2014 by floriano (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted April 19, 2014 Share Posted April 19, 2014 What do you mean by not possible? What are chmod permissions of your site's folder? Try setting all folders to 755, or 777 as a test Link to comment Share on other sites More sharing options...
floriano Posted April 19, 2014 Author Share Posted April 19, 2014 I can upload but file size little. eg size 1,66 MB Link to comment Share on other sites More sharing options...
NemoPS Posted April 19, 2014 Share Posted April 19, 2014 SO is the upload timing out? Link to comment Share on other sites More sharing options...
floriano Posted April 19, 2014 Author Share Posted April 19, 2014 (edited) Its always loading, don't stop. Don't saved products. I loaded a file of 7 MB, is ok, but, I tried to upload one of 17MB but not possible. Why can not I upload files larger? Can someone help me? Edited April 20, 2014 by floriano (see edit history) Link to comment Share on other sites More sharing options...
scottm Posted April 29, 2014 Share Posted April 29, 2014 (edited) Hey Floriano, I think I have your answer. There is a constant set at 10MB in the Uploader.php file. This is located in the /classes folder. It is set in bytes, so you will need to increase it. const DEFAULT_MAX_SIZE = 10485760; 20MB would be 20971520100MB would be 104857600, etc... We wrote an article for it on our Support Center since we had customers run across this as well. If you like, check it out below:Fixing the virtual product upload error. Edited April 29, 2014 by scottm (see edit history) 1 Link to comment Share on other sites More sharing options...
floriano Posted May 6, 2014 Author Share Posted May 6, 2014 Hi Scottm, thanks for your response but, I haven't in classes/uploader.php. I have in classes only Upgrader.php const DEFAULT_MAX_SIZE this is Upgrader.php class UpgraderCore { const DEFAULT_CHECK_VERSION_DELAY_HOURS = 24; public $rss_version_link = 'http://api.prestashop.com/xml/upgrader.xml'; public $rss_md5file_link_dir = 'http://api.prestashop.com/xml/md5/'; /** * @var boolean contains true if last version is not installed */ protected $need_upgrade = false; protected $changed_files = array(); protected $missing_files = array(); public $version_name; public $version_num; public $version_is_modified = null; /** * @var string contains hte url where to download the file */ public $link; public $autoupgrade; public $autoupgrade_module; public $autoupgrade_last_version; public $autoupgrade_module_link; public $changelog; public $md5; public function __construct($autoload = false) { if ($autoload) { $this->loadFromConfig(); // checkPSVersion to get need_upgrade $this->checkPSVersion(); } } public function __get($var) { if ($var == 'need_upgrade') return $this->isLastVersion(); } What's missing from my classes !? Link to comment Share on other sites More sharing options...
scottm Posted May 6, 2014 Share Posted May 6, 2014 Hello floriano, Apologies, my version of PrestaShop 1.5 had actually been upgraded to 1.6 You are not missing anything in your version, the coding change happened in 1.6. When testing the default installl the Virtual Product upload would not allow me to upload anything above 16MB exactly. I did get an error message saying "Could not upload file." , however. In looking at the default setup, my limitation was due to the post_max_size setting in my php.ini file being set to 16M. Once I upped that, the file uploaded. In further testing, I did not find a specific size limit for the Virtual Products like there is in 1.6.x It is strictly limited by both the post_max_size and the upload_max_filesize. Since my upload_max_filesize was set to a high 256, it had no effect on my upload. Another thing to consider, if you did bump the upload_max_filesize and post_max_size to significant sizes but still are unable to upload, be sure that your php.ini file is set to be recursive. If it is not, the file doing the upload may be running off of the server default php.ini file which may be much more restrictive. Let us know if this helps! Kindest Regards,Scott M - InMotion Hosting Customer Community Link to comment Share on other sites More sharing options...
scottm Posted May 12, 2014 Share Posted May 12, 2014 Hello floriano, There is one other thing you may want to check. This involves your hosting company. On our servers, there is a limit of 128MB set for all uploads using Apache. This is governed by the Apache security module. Even if PrestaShop is se to allow much larger files, it will not upload anything larger than the 128MB. The bad part is that PrestaShop does not give an error when this happens because it does not throw an error that prestashop checks for, nor is it a php error. I had to find it by tracing and watching the Apache error logs for the customer who was having the issue. Check with your hosting company to see if they have a mod_security rule set to disallow uploads over a certain size. If that is the case they may have other plans available that allow larger file uploads. Kindest Regards, Scott M Link to comment Share on other sites More sharing options...
RobS Posted December 24, 2014 Share Posted December 24, 2014 Hello I am now having this same problem was there a fix in all of this that was written? Thanks Link to comment Share on other sites More sharing options...
A-Z Hosting Posted April 3, 2015 Share Posted April 3, 2015 (edited) I would like to bump this since it seems to be the best solution when the problem was around before. It's back!!!! in 1.6.0.14 PHP Max upload filesize is 10MB. I've even tried 128. PHP Max post is 10MB I've even tried 128. classes/Uploader.php const DEFAULT_MAX_SIZE = 104857600; //100 Module Virtual Product Combinations uses file upload tool here: echo Module::getInstanceByName('combinationsfile')->fileUpload(Tools::getValue('id_attribute'), Tools::getValue('token')); When trying to upload a 2.9mb file the following is received. The uploaded file exceeds the "Maximum size for a downloadable product" set in preferences (2MB) or the post_max_size/ directive in php.ini (2MB). Testing with a basic Virtual Product with single file and no combinations and it does the same thing. Wil Edited April 3, 2015 by A-Z Hosting (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted April 4, 2015 Share Posted April 4, 2015 Hm, I wonder if there is some ini_set somewhere that overrides it to 2mb. at this point. THe only one I found was in config.inc, this if (Tools::convertBytes(ini_get('upload_max_filesize')) < Tools::convertBytes('100M')) ini_set('upload_max_filesize', '100M'); Link to comment Share on other sites More sharing options...
A-Z Hosting Posted April 6, 2015 Share Posted April 6, 2015 That's all I am finding as well. Everything else grabs the values from ini_get passing it through getOctet in Tools then divides upon it. So 10MB going in and 10 comes out and I also tested this by passing it thru the same getOctet function. I'm going to go ahead and create a ticket in the forge as there is an obscure bug somewhere. Thanks Wil Link to comment Share on other sites More sharing options...
Rosie Posy Posted June 21, 2015 Share Posted June 21, 2015 Hi guys I tried uploading a pdf user guide and get this error message. I have compressed the pdf file but still get the error message. Is it my hosting company or is there a setting in presta shop that I could change? Thanks for any advice: Kind regards Len Upload error. Please check your server configurations for the maximum upload size allowed. Link to comment Share on other sites More sharing options...
NemoPS Posted June 24, 2015 Share Posted June 24, 2015 How big is the pdf? Link to comment Share on other sites More sharing options...
Rosie Posy Posted June 24, 2015 Share Posted June 24, 2015 Hi Nemo The compressed file is 1.9 MB Link to comment Share on other sites More sharing options...
vekia Posted June 24, 2015 Share Posted June 24, 2015 as message says, have you checked the server environment settings? php.ini search for upload_max_filesize = 10M post_max_size = 10M 10M means 10mb, in your case value is smaller probably. Link to comment Share on other sites More sharing options...
Rosie Posy Posted July 13, 2015 Share Posted July 13, 2015 HI guys The pdf file size is within the limits of ovh and prestashop 1.6. I have one user manual in English which is uploaded in the english language add. The French user manual therefore not loading. Is this normal? Can I have one pdf in English and in the French 'section' of the add the French pdf file? I think that is why the french pdf is not loading. Am I right? If not is there a way I can have both the french and the english pdf user guides as seperate downloads for one add? Thanks for your advice Kind regards Len Link to comment Share on other sites More sharing options...
NemoPS Posted July 13, 2015 Share Posted July 13, 2015 Indeed: http://nemops.com/prestashop-attachments-language/#.VaN3Xvnzrmg Link to comment Share on other sites More sharing options...
Rosie Posy Posted July 13, 2015 Share Posted July 13, 2015 Thanks guys! I now have both the English and French user guide as options on the product description. Kind regards Len Link to comment Share on other sites More sharing options...
Vipul Hadiya Posted March 31, 2016 Share Posted March 31, 2016 I am just wondering why do you anyne don't change it from Administration -> Preferences -> UPLOAD QUOTA Find screenshot. 2 Link to comment Share on other sites More sharing options...
Recommended Posts