Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by amoeba

  1. I've been struggling with this image upload issue for a while and have finally found a solution to my problem. I thought I'd detail what I did in case it helps anyone else. For me, the issue was related to the fact that my hosting provider uses open_basedir restrictions. This allows them to limit which directories my PHP scripts have access to read and write to. Like a lot of hosting providers, they host multiple sites on a single box, so limit what your scripts have access to so you don't have the ability to traverse into another persons directories. Whenever an image was uploaded, it went into a temporary upload directory that Prestashop did not have the rights to operate in (i.e. was not included in the open_basedir allowed directories). So while the image did get uploaded to the server, Prestashop was unable to then move the file into its image directories and operate on it as normal. The solution for me was to get my hosting provider to change the PHP temp_upload_dir value to a directory that was inside of those that the open_basedir restrictions allowed me to access. As soon as that change was made, my images upload perfectly, first time! You can check to see if you have open_basedir restrictions in place by checking your phpinfo. If you have a value in open_basedir (rather than null) then there is a good chance you have those restrictions in place, and they may be affecting your ability to upload images. You may be able to change your temp_upload_dir in your php.ini or .htaccess file, depending on whether or not your host allows that, otherwise you may have to call them and get them to make the change for you. This may not be the solution for everyone, but it solved it for me, so hopefully it helps someone. Lastly a huge thanks to amwdesign, who generously helped me diagnose the problem from the other side of the world.
  2. I was looking at this more over the weekend, and discovered that when I try to upload an image, something pretty strange seems to be happening. In the img folder there's a tmp folder. Before I try to upload an image, it's empty aside from an index.php file. But after I have a failed image upload, there are 4 images named product-mini-X.jpg in the folder - each one a tiny thumbnail of an existing product in the store. None of them, I might add, are the image I'm trying to upload. This may be part of some standard thumbnail creation stuff, but I would have thought that products that already exist wouldn't need new thumbs created. I'm using the latest version of PrestaShop, clean installed to my hosting server, with no changes except that I've added one new product and I'm trying to get image uploads to work.
  3. I'm new to Prestashop, which looks fantastic BTW, but I'm having problems uploading images. I've just done a fresh install of Prestashop onto my hosting providers server, ensuring that I set all directories to writable where required. My install passed all checks for writable directories, and I have no issues accessing and navigating the shop or the back office. Whenever I try to add an image to a product, I get an error: "an error occurred while copying image". I've tried JPG, PNG and GIFs, and all my test files are under 30Kb. My hosting meets all system requirements (PHP5, MySQL5, etc). Safe Mode is Off, so it shouldn't be that. Can anyone help? I'm not even sure where to start troubleshooting this?
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More