Jump to content

Error uploading images


Recommended Posts

I'm re-installing Prestashop after the last version did not survive an upgrade. When entering the categories and first products, I was able to upload images. Suddenly Prestashop refuses to accept new images, giving an error message: unable to upload the image.

 

I've tried several things to fix the problem; I gave all subdirs and files in /img 757 permissions, deleted the temp folder of /img, increased the memory size to 128MB, upgraded the PHP version from 5.2 to 5.3, tried several different browsers (Chrome, Firefox, Opera on both PC and Mac) nothing works.

 

I also enabled error messages in the config.inc.php. The result is that Prestashop returns an 'undefined' error when I try to upload an image, so that does not help to. Firefox under Windows returns an error stating that the image I'm trying to upload is empty, which it is not.

 

Does anyone have a clue what the problem might be? It suddenly stopped working and I can't seem to get it working again...

Link to comment
Share on other sites

Hello michielvd, which version are you trying to install? Are you trying to do a new install? Also, have you checked your Server Error Log? That may give us more information. Thank you!

 

It's version 1.5.1.0. The Prestashop log is empty, as are the hosting error logs (I've just enabled them and tried to upload an image in a product, error log remains empty). The only errors the error log is reporting are errors about a missing robots.txt.

 

Some additional information: Prestashop does something with the uploads, as files do show up in the /img/tmp folder. They are, however, 0 bytes in size. I just found 1 file which was ± 2KB, which was a thumbnail of one of the uploaded files with evidently did get processed in a sort-of proper way.

Edited by michielvd (see edit history)
Link to comment
Share on other sites

hello.

 

Sory for my english.

 

I' ve have problem with upload products images.

I dont modyfiy any files after installation shop.

Version 1.5.1.0

I can upload category images but not products .

I recive message:

"undefine" or "An error occurred during the image upload"

Its some problem with ajax uploader?

The permission are 777 for img folder on serwer.

I triad on 2 host:

in:

http://superhost.pl

and

http://www.az.pl/

 

Any ideas?

 

Thank You for your help.

Edited by kodografia (see edit history)
Link to comment
Share on other sites

hey,i have version 1.5.0 for some time now,i have posted many products on my website but yesterday i wanted to change some photos and when i tried to upload other photos on my products i received this error: undefined. what should i do? i didn't change anything,it occurred suddenly . please help

Link to comment
Share on other sites

Ok it works in chrome to.

What I must change in second presta installation?

Very very thank You.

 

what did you do?i'm having the same problem,when i try to upload an image to a product it gives me this error: undefined.I didin't change anything, i have products listed,this error was suddenly.

Link to comment
Share on other sites

I do nothing - i add to forum my admin login - perhaps sombody do somthing- but i dont recive any answer.

And it start works in this installation - but in secend installation of presta it still dont work - work only in ie9.

It is strange for me. I dont now what is wrong.

Link to comment
Share on other sites

I do nothing - i add to forum my admin login - perhaps sombody do somthing- but i dont recive any answer.

And it start works in this installation - but in secend installation of presta it still dont work - work only in ie9.

It is strange for me. I dont now what is wrong.

 

i see that nobody is answering.the thing is that i have products,images,the shop is up and running but one day i found myself unable to upload photos.that's strange.i don't want to think that this happened because they released a newer version of prestashop,it will be stupid that every month to update prestashop.

Link to comment
Share on other sites

I had the same error under Debian + Firefox combo. Try to give 777 permission to the img folder and it's subfolder too:

/var/www/prestashop$ sudo chmod -R 777 img

 

I tried that,i don't undertand,i list a product with pictures and everything and on the second products error:undefined,i updated to the last version of prestashop,worked with 4 products and on the 5th the dammed error again.i even mailed prestashop support,still no answer.i had tons of problems with this prestashop.

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Hello

 

Same issue.

Prestashop 1.5.3

Works fine on my testing.xxxx.com and staging.xxxx.com but not in www.xxxxx.com

And my www is an image of staging !

It's a access denied for some XHR, but not all XHR (search in front works...)

I've no ideas at the moment...

 

JC

Link to comment
Share on other sites

Hi, I found solution for me , before that I read all topics on all forums :)

The answer is easy :

Open, or create your .htaccess file in presta root folder

and .... i write there this : <!-- this overwrite the default settings -->

 

 

<Ifmodule mod_php4.c>

php_value error_log "/home/your_log_folder/some_store.com.phplog"

php_value upload_max_filesize 24M

php_value max_execution_time 30

php_value max_input_time 60

php_value memory_limit 256M

php_value post_max_size 24M

php_flag register_globals off

php_flag display_errors off

php_flag file_uploads on

php_flag log_errors off

php_flag output_buffering off

php_flag register_argc_argv on

php_flag magic_quotes_gpc off

php_flag magic_quotes_runtime off

php_flag magic_quotes_sybase off

php_flag mysql.allow_persistent off

php_flag register_long_arrays on

php_flag allow_url_fopen on

php_flag cgi.force_redirect on

php_flag enable_dl on

</Ifmodule>

 

<Ifmodule mod_php5.c>

php_value error_log "/home/your_log_folder/some_store.com.phplog"

php_value upload_max_filesize 24M

php_value max_execution_time 30

php_value max_input_time 60

php_value memory_limit 256M

php_value post_max_size 24M

php_flag register_globals off

php_flag display_errors off

php_flag file_uploads on

php_flag log_errors off

php_flag output_buffering off

php_flag register_argc_argv on

php_flag magic_quotes_gpc off

php_flag magic_quotes_runtime off

php_flag magic_quotes_sybase off

php_flag mysql.allow_persistent off

php_flag register_long_arrays on

php_flag allow_url_fopen on

php_flag cgi.force_redirect on

php_flag enable_dl on

</Ifmodule>

--------------

after that no problems to upload pictures from 12 MB with very big resolution

 

 

http://888podaraka.com

Edited by dstanimirov (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi all i just had this error. with pic uploads. I had show errors set to true in config folder > defines.inc.php whe i was checking for errors on something else. thought i had changed it back, but had not over written the file. Not sure if anyone else did that , now ever the show errors does block the picture from showing even though the pictiures upload. (bit i could not see them) check your ettors settings if you may have changed it in the past. in defines file. set it to false.

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

 

please help me it's urgent . Prestashop Version: 1.4.6.2

 

I've a similar problem. my prestashop don't show my images uploaded by .CSV files by FTP filezilla

 

I've two prestashop platform : a test platform (permission file 700) and a webstore platform ( all permission file are in 777).

but i've tried change permission but it's still no work

 

So, i've always uploaded my images correctly with csv files without problems.

 

But since 2 month, in my webstore my images don't show. i try one items, two, ten..etc...while in my test platform works

 

First, in the both platform my preference images are without small_default and large_default, same Advanced Parameters Posted Image Performance disable cache, same clear files in directory smarty/ cache and complile; both platform are setted as :

memory_limit now set to 128mb

max_execution_time = 30

max_input_time = 30

 

The image upload is white with question mark and this is the wrong link associated by Prestashop :

 

http://sexyshopmonch.../1859-small.jpg

 

 

while when it worked the correct link was (this happened for both platform) :

 

http://sexyshopmonch...-1379-small.jpg

 

 

 

If i upload manually it's works. I've tried somes solutions in this forum but it don't works

 

I post my .htaccess files so you can see some error if you find

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution

# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE

# http://www.prestashop.com - http://www.prestashop.com/forums

 

 

# URL rewriting module activation

RewriteEngine on

# URL rewriting rules

RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2$3.jpg [L]

RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L]

RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L]

RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]

RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]

RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]

RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]

RewriteRule ^([a-z]{2})/[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L]

RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$2&isolang=$1 [QSA,L]

RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$2&isolang=$1&noredirect=1 [QSA,L]

RewriteRule ^([a-z]{2})/([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$2&isolang=$1 [QSA,L]

RewriteRule ^([a-z]{2})/content/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms=$2 [QSA,L]

RewriteRule ^([a-z]{2})/content/category/([0-9]+)\-[a-zA-Z0-9-]* /cms.php?isolang=$1&id_cms_category=$2 [QSA,L]

RewriteRule ^([a-z]{2})/([0-9]+)__[a-zA-Z0-9-]* /supplier.php?isolang=$1&id_supplier=$2 [QSA,L]

RewriteRule ^([a-z]{2})/([0-9]+)_[a-zA-Z0-9-]* /manufacturer.php?isolang=$1&id_manufacturer=$2 [QSA,L]

RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]

RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L]

RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]

RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]

RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]

RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]

RewriteRule ^en/page-not-found$ /404.php?isolang=en [QSA,L]

RewriteRule ^en/address$ /address.php?isolang=en [QSA,L]

RewriteRule ^en/addresses$ /addresses.php?isolang=en [QSA,L]

RewriteRule ^en/authentication$ /authentication.php?isolang=en [QSA,L]

RewriteRule ^en/best-sales$ /best-sales.php?isolang=en [QSA,L]

RewriteRule ^en/cart$ /cart.php?isolang=en [QSA,L]

RewriteRule ^en/contact-us$ /contact-form.php?isolang=en [QSA,L]

RewriteRule ^en/discount$ /discount.php?isolang=en [QSA,L]

RewriteRule ^en/guest-tracking$ /guest-tracking.php?isolang=en [QSA,L]

RewriteRule ^en/order-history$ /history.php?isolang=en [QSA,L]

RewriteRule ^en/identity$ /identity.php?isolang=en [QSA,L]

RewriteRule ^en/manufacturers$ /manufacturer.php?isolang=en [QSA,L]

RewriteRule ^en/my-account$ /my-account.php?isolang=en [QSA,L]

RewriteRule ^en/new-products$ /new-products.php?isolang=en [QSA,L]

RewriteRule ^en/order$ /order.php?isolang=en [QSA,L]

RewriteRule ^en/order-follow$ /order-follow.php?isolang=en [QSA,L]

RewriteRule ^en/quick-order$ /order-opc.php?isolang=en [QSA,L]

RewriteRule ^en/order-slip$ /order-slip.php?isolang=en [QSA,L]

RewriteRule ^en/password-recovery$ /password.php?isolang=en [QSA,L]

RewriteRule ^en/prices-drop$ /prices-drop.php?isolang=en [QSA,L]

RewriteRule ^en/search$ /search.php?isolang=en [QSA,L]

RewriteRule ^en/sitemap$ /sitemap.php?isolang=en [QSA,L]

RewriteRule ^en/stores$ /stores.php?isolang=en [QSA,L]

RewriteRule ^en/supplier$ /supplier.php?isolang=en [QSA,L]

RewriteRule ^en$ /en/ [QSA,L]

RewriteRule ^en/([^?&]*)$ /$1?isolang=en [QSA,L]

RewriteRule ^it/page-not-found$ /404.php?isolang=it [QSA,L]

RewriteRule ^it/address$ /address.php?isolang=it [QSA,L]

RewriteRule ^it/addresses$ /addresses.php?isolang=it [QSA,L]

RewriteRule ^it/authentication$ /authentication.php?isolang=it [QSA,L]

RewriteRule ^it/best-sales$ /best-sales.php?isolang=it [QSA,L]

RewriteRule ^it/cart$ /cart.php?isolang=it [QSA,L]

RewriteRule ^it/contact-us$ /contact-form.php?isolang=it [QSA,L]

RewriteRule ^it/discount$ /discount.php?isolang=it [QSA,L]

RewriteRule ^it/guest-tracking$ /guest-tracking.php?isolang=it [QSA,L]

RewriteRule ^it/order-history$ /history.php?isolang=it [QSA,L]

RewriteRule ^it/identity$ /identity.php?isolang=it [QSA,L]

RewriteRule ^it/manufacturers$ /manufacturer.php?isolang=it [QSA,L]

RewriteRule ^it/my-account$ /my-account.php?isolang=it [QSA,L]

RewriteRule ^it/new-products$ /new-products.php?isolang=it [QSA,L]

RewriteRule ^it/order$ /order.php?isolang=it [QSA,L]

RewriteRule ^it/order-follow$ /order-follow.php?isolang=it [QSA,L]

RewriteRule ^it/quick-order$ /order-opc.php?isolang=it [QSA,L]

RewriteRule ^it/order-slip$ /order-slip.php?isolang=it [QSA,L]

RewriteRule ^it/password-recovery$ /password.php?isolang=it [QSA,L]

RewriteRule ^it/prices-drop$ /prices-drop.php?isolang=it [QSA,L]

RewriteRule ^it/search$ /search.php?isolang=it [QSA,L]

RewriteRule ^it/sitemap$ /sitemap.php?isolang=it [QSA,L]

RewriteRule ^it/stores$ /stores.php?isolang=it [QSA,L]

RewriteRule ^it/supplier$ /supplier.php?isolang=it [QSA,L]

RewriteRule ^it$ /it/ [QSA,L]

RewriteRule ^it/([^?&]*)$ /$1?isolang=it [QSA,L]

 

# Catch 404 errors

ErrorDocument 404 /404.php

 

ExpiresActive On

ExpiresByType image/gif "access plus 1 month"

ExpiresByType image/jpeg "access plus 1 month"

ExpiresByType image/png "access plus 1 month"

ExpiresByType text/css "access plus 1 week"

ExpiresByType text/javascript "access plus 1 week"

ExpiresByType application/javascript "access plus 1 week"

ExpiresByType application/x-javascript "access plus 1 week"

ExpiresByType image/x-icon "access plus 1 year"

 

FileETag INode MTime Size

 

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...