Nepherael Posted December 8, 2013 Share Posted December 8, 2013 (edited) I was setting up my prestashop today and was unable to upload any product images. Every time I tried I got an error that just said "undefined". I went searching around and found many topics with a lot of different suggestions to fix it but none were working for people. I wanted to post the solution I found to make it easier to find for anyone else with this issue. While searching I ran across this topic http://forge.prestashop.com/browse/PSCFV-10632 and a few posts down it says to disable mod_security in preferences > SEO & URLS in the back office. The actual setting is "Disable Apache Mod Security" and you need to set it to "yes" I also changed my image resolution. The file size was below 1mb but that wasn't the problem. My images were above 2000x3000 pixels so I changed the size to 900x1200 and that change coupled with the setting changed worked That is what worked for me. Hope this helps anyone searching for this problem EDIT: just to make sure, when I changed that setting I also turned on friendly URL. I doubt that had any effect on it but I figured it was worth mentioning Edited December 9, 2013 by Nepherael (see edit history) 1 Link to comment Share on other sites More sharing options...
amanullah.en Posted December 12, 2013 Share Posted December 12, 2013 (edited) I have got an another solution.... I tried the method discussed here but i failed to recover my problem..... By 2 days efort finally I got another solution which disscussed below.... My domain was a subdomain like "shop.mydomain.com" and my prestashop software was installed in this domain folder "shop". I explored that when I use my url like "shop.mydomain.com/adminfolder" (default) it did not work but when I use my url like "mydomain.com/shop/adminfolder" then it work without any change of the software/program. If you are using a subdomain, I suggest you to use the url like "yourdomain.com/subdomain-name/adminfolder" only for uploading the product image. Otherwise use default url. Now I am using the version 1.5.6.1 by tihs method without any "undefined" error... NB: After your login the software will show you a warning message to change your domain. Please don't any response of this warning message. Edited December 12, 2013 by amanullah.en (see edit history) Link to comment Share on other sites More sharing options...
kianwan87 Posted January 6, 2014 Share Posted January 6, 2014 I was setting up my prestashop today and was unable to upload any product images. Every time I tried I got an error that just said "undefined". I went searching around and found many topics with a lot of different suggestions to fix it but none were working for people. I wanted to post the solution I found to make it easier to find for anyone else with this issue. While searching I ran across this topic http://forge.prestashop.com/browse/PSCFV-10632 and a few posts down it says to disable mod_security in preferences > SEO & URLS in the back office. The actual setting is "Disable Apache Mod Security" and you need to set it to "yes" I also changed my image resolution. The file size was below 1mb but that wasn't the problem. My images were above 2000x3000 pixels so I changed the size to 900x1200 and that change coupled with the setting changed worked That is what worked for me. Hope this helps anyone searching for this problem EDIT: just to make sure, when I changed that setting I also turned on friendly URL. I doubt that had any effect on it but I figured it was worth mentioning hi thank you. your method worked when i changed the size to 900x1200. what other size can i change it to for it to work on landscape ? what about my logo and banner ? what size should i use ? Link to comment Share on other sites More sharing options...
curiousbox Posted February 24, 2014 Share Posted February 24, 2014 I am having this problem the last few days too. I have tried some solutions listed on the forum - enabling php 4 as opposed to 5 : this made me unanle to log or load any pages at all so I switched it back - , the solution above regarding "Disable Apache Mod Security" and I've also tried the various file permission alterations to no avail. If I try to upload to a product I receive the error "An error occurred during the image upload process." I've also observed that if I try to upload a module I receive the following error "An error occurred while copying archive to the module directory." Any help or advice would be fabulous! Link to comment Share on other sites More sharing options...
Nepherael Posted February 26, 2014 Author Share Posted February 26, 2014 I am having this problem the last few days too. I have tried some solutions listed on the forum - enabling php 4 as opposed to 5 : this made me unanle to log or load any pages at all so I switched it back - , the solution above regarding "Disable Apache Mod Security" and I've also tried the various file permission alterations to no avail. If I try to upload to a product I receive the error "An error occurred during the image upload process." I've also observed that if I try to upload a module I receive the following error "An error occurred while copying archive to the module directory." Any help or advice would be fabulous! Hi, I'm pretty amateur but something came to mind when reading your post. You can't even upload a module through your shop but you said you changed file permissions. Were these permissions changed through your hosting provider site? Before I went live I had issues like that on my xampp server and had to get in and allow file writing through my server. My first step (if you haven't done this yet) would be to make sure you have enabled everything through your control panel on your hosting providers site, then do some searching for that provider about enabling file upload and transfer and see if you have to call them (some hosting providers have limited upload sizes for website upload). If all that is good to go let us know and, if I can't help, hopefully one of the big dogs will come in and know about it Link to comment Share on other sites More sharing options...
curiousbox Posted February 26, 2014 Share Posted February 26, 2014 Hi, I'm pretty amateur but something came to mind when reading your post. You can't even upload a module through your shop but you said you changed file permissions. Were these permissions changed through your hosting provider site? Before I went live I had issues like that on my xampp server and had to get in and allow file writing through my server. My first step (if you haven't done this yet) would be to make sure you have enabled everything through your control panel on your hosting providers site, then do some searching for that provider about enabling file upload and transfer and see if you have to call them (some hosting providers have limited upload sizes for website upload). If all that is good to go let us know and, if I can't help, hopefully one of the big dogs will come in and know about it Hi there, I reset the permissions for the whole thing to 777 (using filezilla) and, yes I'm able to upload photos again and modules. Rookie mistake. I'm still a little unsure as to what file permission settings I should have now - since anything other than 777 seems to cause problems and obviously I can't leave it at 777. For now I guess I'll just carry on updating the catalogue. Thanks! Link to comment Share on other sites More sharing options...
El Patron Posted February 26, 2014 Share Posted February 26, 2014 Hi there, I reset the permissions for the whole thing to 777 (using filezilla) and, yes I'm able to upload photos again and modules. Rookie mistake. I'm still a little unsure as to what file permission settings I should have now - since anything other than 777 seems to cause problems and obviously I can't leave it at 777. For now I guess I'll just carry on updating the catalogue. Thanks! this is a problem typically associated with mis-configured hosting account. The file owner, typically your shop url without the www is not set correctly. In other words you should not have to set a file permission to 777 in order for your shop to update it. Having a file/folder at 777 allows 'anyone' to write to it. This is very bad. I would contact my hosting provider (assuming you have no way to check yourself) and ask them who is the file owner of your shop files. note: never ever use 777 except to prove that the issue is shop file ownership. Link to comment Share on other sites More sharing options...
curiousbox Posted February 26, 2014 Share Posted February 26, 2014 Thanks, El Patron, I know that using 777 is not recommended, I'm just happy that I now know what the problem was. Link to comment Share on other sites More sharing options...
El Patron Posted February 26, 2014 Share Posted February 26, 2014 Thanks, El Patron, I know that using 777 is not recommended, I'm just happy that I now know what the problem was. with pleasure, make sure to let us know about file owner...happy day Link to comment Share on other sites More sharing options...
curiousbox Posted February 26, 2014 Share Posted February 26, 2014 so, it seems the problem actually was my PHP settings with my provider. They were running as an Apache application but the hosting provider suggested changing them to run as a CGI module - then I was able to set the permissions to 755 and had no problems uploading images or anything afterwards. Thanks again for everyone's help here. Link to comment Share on other sites More sharing options...
El Patron Posted February 26, 2014 Share Posted February 26, 2014 I would use fastcgi note: make sure if they change your php runtime config that the modules to run ps...are active. because modules are loaded by php type. 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