digtheweb Posted December 1, 2010 Share Posted December 1, 2010 I know problems similar to this have threads across the forum... and I have read all of them! I am uploading downloadbale products to my website www.buymagazinearticles.co.uk/test and the file sizes range from a few K to 150MB. I am using Prestashop 1.3.1.1I changed the settings in my php.ini file to: upload_max_filesize = 200M ; post_max_size = 10M ; max_execution_time = 2400 ; memory_limit = 200M I wasn't sure where to put it so I put it in the root of the shop and in the admin folder.I have been using a workaround that somebody provided on another post and that has been kind of working although not consistently... this got around the issue of not being able to upload large files. However, when I went to download the files to test them, they wouldn't work. So I looked again... this time, I found a revised get-file.php file which I used to replace the one that was already on the site... problem solved. No issue! I was uploading and downloading 150M files, no problem.Now, for some reason unbeknownst to me, I am now unable to upload even 20MB files! Well, I can upload them, but even using the workaround, I can't get them to attach to the relevant products.Somebody on another post suggested adding the following five lines to the .htaccess file in the root of the shop and in the downloads folder: # Max size upload file php_value upload_max_filesize 200M php_value post_max_size 200M php_value max_execution_time 2400 php_value max_input_time 2400 But it doesn't seem to have made any difference. I am truly tearing my hair out and am willing to pay someone to sort this out for me if I can't find the answer elsewhere.Please help me out if you can The support on this forum has been amazing so far and apart from this issue I'm extremely happy with Prestashop as an E-Commerce platform. I have attached my get-file.php for reference.Thanks,SamanthaBTW... this is the last entry in my error log:[Wed Dec 01 13:57:21 2010] [error] [client 82.47.220.60] PHP Fatal error: Out of memory (allocated 3407872) (tried to allocate 23904257 bytes) in /home/sites/buymagazinearticles.co.uk/public_html/test/get-file.php on line 339, referer: http://www.buymagazinearticles.co.uk/test/admin123/index.php?tab=AdminCatalog&id_category=5&id_product=108&updateproduct;&token;=215f627eac9f20d026a418d3bf3166dfAnd this is a PHP Check http://www.buymagazinearticles.co.uk/test/phpcheck.php get-file.php Link to comment Share on other sites More sharing options...
digtheweb Posted December 1, 2010 Author Share Posted December 1, 2010 After a bit more messing about, I have successfully managed to prevent myself from being able to download any products at all. Good times.EDITHave undone this disaster and am now left with the original issue. Just don't get why this is working for some files nad not others! Link to comment Share on other sites More sharing options...
tomerg3 Posted December 1, 2010 Share Posted December 1, 2010 you generally need about 2.5 times more RAM than the files you need to download, that may be the issue.Also, some server require a php.ini in each folder, and for any backoffice / modules, you should place the php.ini in your admin folder.Edit: also, if you are trying to use large files, this module will make your life easier http://www.prestashop.com/forums/viewthread/53511/ Link to comment Share on other sites More sharing options...
digtheweb Posted December 2, 2010 Author Share Posted December 2, 2010 Thanks for your response. I am using that module and it does make things easier. Not really getting around this issue though Have just tried to upload a file of a larger size than the ones I have previously been trying to upload that I knew had already worked before. It uploaded and downloaded fine with no issues at all.It seems to be file-specific rather than related to anything else. This is so confusing! Link to comment Share on other sites More sharing options...
tomerg3 Posted December 2, 2010 Share Posted December 2, 2010 Hmm, I'm not sure what it could be then.Are you sure the error from the log is due to your last request there? Link to comment Share on other sites More sharing options...
need4speed Posted December 10, 2010 Share Posted December 10, 2010 Isnt it possible just to upload a small file and then see what the download file is name my prestashop under the download folder. And then overwrite the file with the big version trough a FTP program? Link to comment Share on other sites More sharing options...
thebroadys Posted April 24, 2011 Share Posted April 24, 2011 Yes it workI uploaded the big file (89megs) file via FTP in the download folderUploaded a small fileCopied the name of the file generated by PrestashopDeleted that fileRenamed the big file with that nameit works Link to comment Share on other sites More sharing options...
Prestawood Posted July 28, 2011 Share Posted July 28, 2011 Batch Downloadable Product module did not solve the problem. File 89 Mb stops at 10.13 MB Link to comment Share on other sites More sharing options...
Growin Up Records Posted August 3, 2011 Share Posted August 3, 2011 Hi! I'm having the same problem. I upload the big file and I rename it with the small one's name generated by prestashop, but the problem I have is when I try to download the file because I only get 96Mb not the total size 127Mb could you help me please? thanks Link to comment Share on other sites More sharing options...
Paul C Posted August 4, 2011 Share Posted August 4, 2011 If you're getting errors similar to digtheweb: [Wed Dec 01 13:57:21 2010] [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Out of memory (allocated 3407872) (tried to allocate 23904257 bytes) in <dir>/public_html/test/get-file.php on line 339, referer: blah, blah, blah This is due to the amount of memory a process can use which is also set in php.ini (or modified in .htaccess). Many shared hosting configurations limit this amount to prevent individual sites swamping the server (when real physical memory is exhausted, then the slow disk-based swap space is used). You can try and increase this limit, but in many cases you won't be able to beyond the maximum allowed by the server's php configuration e.g. in .htaccess php_value memory_limit 512M If you can't increase this value high enough to prevent your issues (which I suspect is the case for digtheweb), then, unfortunately you'll have to look at an alternative method to distribute the files or change hosting. You can save a little php script on your server called e.g. phpinfo.php containing the following: <?php phpinfo(); ?> If you browse to the above script it will show you all the current active (local - i.e. the values that apply currently by default for scripts) and "master" values for the various variables (under PHP Configuration, PHP Core). You might find that no matter what you have entered in your .htaccess file, you will be unable to increase the value beyond a certain point. Paul Link to comment Share on other sites More sharing options...
kirillgontt Posted December 2, 2011 Share Posted December 2, 2011 HELP PLS I uploaded small file through product creation (.xlsx), it created no extension file in the download directory. Then I uploaded large file through ftp (.csv) Then I renamed large file with the name generated by presta, without extension. Then I tried to download through the store and it told me: file extension is invalid or file is corrupted. Then I tried to rename with extensions (.csv and .xlsx) and it could not find the file. what to do ? Link to comment Share on other sites More sharing options...
need4speed Posted December 3, 2011 Share Posted December 3, 2011 I think you need to zip your file and then do the trick again. Im quite sure that prestashop by default is compressing the digital files as zip files so you need to zip your files and change the file name to the generated file name without the extension added. 1 Link to comment Share on other sites More sharing options...
Prestawood Posted June 21, 2012 Share Posted June 21, 2012 The only Prestashop developers can solve this issue.. I tried many times & finally to upload the *.urls istead of files.. there is no solutions.. Link to comment Share on other sites More sharing options...
alikasapoglu Posted May 9, 2016 Share Posted May 9, 2016 (edited) Hi guys,I got a similar problem in uploading theme. After spending 15-16 hours, here is the solution I've found:1. edit prestashop settings: administration>preferences , increase values at "upload quota" block2. update php.ini file: 2.1 how to find the location of php.ini file: https://www.ostraining.com/blog/coding/phpini-file/ 2.2 update these values in php.ini (max_input_time 3200 | post_max_size 32M | upload_max_filesize 32M | max_execution_time 300) https://cloud.digitalocean.com/support/suggestions?article=how-to-change-your-php-settings-on-ubuntu-14-04&page=0&query=upload_max_filesize3. restart php and nginx services: (in linux with these commands: "service nginx restart" "service php5-fpm restart")4. increase client_max_body_size of nginx. ( http://stackoverflow.com/questions/2056124/nginx-client-max-body-size-has-no-effect )4th item of the list is not written in anywhere in prestashop forums and many people who cant find a solution especially vps users may need that.I hope it works for you too. Cheers,Ali Edited May 11, 2016 by alikasapoglu (see edit history) 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