Saiff Posted January 29, 2015 Share Posted January 29, 2015 Hello, I just started a shop this week, today i bought a Theme on template monster. I followed every instruction to install that theme correctly, but when i go on Add Theme, then Add files and select my .zip file. I have this error : Server file size is different from local file size What can i do to install my theme.... I didn't find any solution till now. Thank you. Link to comment Share on other sites More sharing options...
bellini13 Posted January 30, 2015 Share Posted January 30, 2015 Prestashop is comparing the size of the file on your computer, to the size of the file that you just uploaded to the server. Technically they should be the exact same size, and if they are not, then likely something is wrong. You can try to bypass this validation, but if the file really is corrupt after uploading, then other things could go wrong, so you do this at your own risk. I also did not test this. I am assuming you are using PS v1.6.0.11, in the future it is a good idea to state this. Edit the class file /classes/Uploader.php. around line 159 you will find the function called 'upload', and inside that function you will see these lines of code if ($file_size === $file['size']) { $file['save_path'] = $file_path; } else { $file['size'] = $file_size; unlink($file_path); $file['error'] = Tools::displayError('Server file size is different from local file size'); } remove those lines and replace them with the following if ($file_size === $file['size']) { $file['save_path'] = $file_path; } else { $file['save_path'] = $file_path; } Link to comment Share on other sites More sharing options...
Saiff Posted January 30, 2015 Author Share Posted January 30, 2015 Hi bellini13 ! Thank you so much for your answer, i just modify this php file as you said to me, but now when i add the zip file of my theme on the panel, i have another error : "Zip file seems to be broken" I am so disappointed that i can't even install this theme... Link to comment Share on other sites More sharing options...
razaro Posted January 30, 2015 Share Posted January 30, 2015 Try to unzip that theme and check its content. Sometimes theme is packed with documentation and PSD files in one big zip file. And that big zip file contain theme zip file that should be used. 1 Link to comment Share on other sites More sharing options...
Saiff Posted January 30, 2015 Author Share Posted January 30, 2015 Try to unzip that theme and check its content. Sometimes theme is packed with documentation and PSD files in one big zip file. And that big zip file contain theme zip file that should be used. This was the issue, i unzipped this source file and now i have a new source folder. I Tried to upload the theme from my computer now, but i have another issue, it writes : Upload succesful. But when i want to apply my theme, i can't even see him. If someone with a good hearth will take 5min to help me i would appreciate it a lot. Skype : amoniks99 Link to comment Share on other sites More sharing options...
bellini13 Posted January 30, 2015 Share Posted January 30, 2015 did you undo the code that i suggested? if not, try to undo the code and upload again Link to comment Share on other sites More sharing options...
JoelWebsites Posted February 26, 2015 Share Posted February 26, 2015 https://www.prestashop.com/forums/topic/323632-solved-error-uploading-product-image/ Link to comment Share on other sites More sharing options...
devid996 Posted December 15, 2015 Share Posted December 15, 2015 Hi, i have same problem but not result...i need help Link to comment Share on other sites More sharing options...
keanu Posted February 26, 2016 Share Posted February 26, 2016 Any update on this? I have the same problem, and it seems many others too... I use prestashop 1.6.1.1, trying to upload a theme via back office Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2016 Share Posted September 5, 2016 Hey I had the same problem. I looked into my /cache folder and discovered that some folders and 1 file was missing. I then copied them from my old site. And now I can Import themes again. I don't know if this could help you Link to comment Share on other sites More sharing options...
lefan Posted September 14, 2016 Share Posted September 14, 2016 Same here, so i checked my error.log: PHP message: PHP Warning: move_uploaded_file(/var/www/my-domain/cache/sandbox/57d956664fb7a/uploaded.zip): failed to open stream: No such file or directory in /var/www/my-domain/classes/Uploader.php on line 186 so, i did create folder sandbox and set perm 0775 now working fine. Link to comment Share on other sites More sharing options...
Recommended Posts