Jump to content

Product image upload error - Prestashop 1.5.6


Recommended Posts

I have problem with uploading images to products. There is no problem with uploading images to categories, shop logos,... Problem is only with uploading product image "An error occurred while copying image". Situation looks like here http://www.prestashop.com/forums/topic/273153-presta-155-product-image-upload-error/?hl=%2Berror+%2Boccurred+%2Bwhile+%2Bcopying+%2Bimage but I checked tools.php, this file doesn´t contain bug specified here. 

 

Write permissions are 777 for "img" folder.

 

I noticed there was problem during instalation when sample images didn´t copy at first time. When I attempted install again images copied well.

 

I have installed the same system on my localhost, this system goes well (I can add product images etc...). Version of my PS in 1.5.6.1.

 

When localhost goes OK - I think there could be problem with my webhosting.

 

Can you help me please?

Link to comment
Share on other sites

can you turn error reportin on to se better what is the problem?

 

Here is how you do it

1- Navigate to the PrestaShop 1.5 root folder.
2- From there, navigate the path /config/defines.inc.php
3- Open up the defines.inc.php file in the text editor.
4- Find the line of code that reads "define('_PS_MODE_DEV_', false)" This is line 28 by default in PrestaShop 1.5.
5- Change it to read "define('_PS_MODE_DEV_', true)".

 

after that do your action again, and share the error with us

Link to comment
Share on other sites

can you turn error reportin on to se better what is the problem?

 

Here is how you do it

1- Navigate to the PrestaShop 1.5 root folder.

2- From there, navigate the path /config/defines.inc.php

3- Open up the defines.inc.php file in the text editor.

4- Find the line of code that reads "define('_PS_MODE_DEV_', false)" This is line 28 by default in PrestaShop 1.5.

5- Change it to read "define('_PS_MODE_DEV_', true)".

 

after that do your action again, and share the error with us

Thank you Walidon,

I did the proces you told me. After next attempting to upload an image error displays "undefined".

 

What can I do with this?

Link to comment
Share on other sites

maybe the size of the images you are trying to upload is large! try to resize them and retry!

I don´t think that. The image has size 142 kB. I tried the same with 24 kB file but It makes the same error.

 

When I think about that, there could be a problem with writing to hosting. Installer made error while copying "sample images of iPods". My next problem is with localization - installing language. I try to localize by importing localization pack, everything seems to be downloaded and set but language in BO/FO doesn´t change. In my localhost this goes OK.

 

In my opinion can both 2 problems have similar solving???

Link to comment
Share on other sites

  • 9 months later...

I don't know if you have resolved the error, but i think the problem is dued to the user which php script run. You can check this by the ftp or if you have access through the console. In ftp check if owner:group of directory is the same of the file. At least permission should be 0775 because the user and group have the need to read, write and traverse. If you using a control panel like plesk, try to change the working mode of php from Apache module to fastcgi, in this manner the script run like the site owner, and consequently the uploaded file have the same owner.

 

Hope this can help.

Link to comment
Share on other sites

×
×
  • Create New...