Jump to content

Still can’t upload ANY .gif, .jpg, .png images - which php file is doing the check / can be corrupted ?!?!? Please help!


Recommended Posts

Hi,

prestashop 1.1.0.5 …

… I cant upload any images (logo, language, products) and get always the same failure reply:
“1 error image format not recognized, allowed formats are: .gif, .jpg, .png”

Have saved my test images in .gif .jpg .png tried different software (photoshop, preview, fireworks)
and different sizes AND nothing works !

I even can’t download the existing IPod images from the demo site and upload them again !?

Checked all php permissions also …

Anything else works fine, like editing new categories, products etc.

Urgent please help – what could be the problem ???

Link to comment
Share on other sites

Hi,

I am talking about uploading ANY .gif .jpg .png images using the admin back office (using any browser),
e. g. when creating a new product ...

And yes all php permissions checked twice

I really don't know what else to do ?!?

Can the file thats responsible for checking uploaded images be corrupt ??
- And if which file would that be ???

Link to comment
Share on other sites

  • 2 weeks later...

hi,

did you find a solution? i suffer the same problem.
i checked all folder permissions, added the php_values (memory limit, max execution time), tried different image formats and sizes and also reinstalled twice the prestashop 1.1.0.5.

other than you even turning display_errors on in confic.inc.php i get no error messages...

thanks in advance
andreas

Link to comment
Share on other sites

  • 2 weeks later...


Hi,

thanks, but for END USERS like me its impossible to fix the problem, (as the hack from andreas doesn't work for me)
is there ANY solution or kind of guidance for non programmers / hackers ?!?!


Cheers,
1000yard who wanted to become an online shop since 12.2008 and still cant upload ANY pictures .... .... .... ... ... :-(

Link to comment
Share on other sites

Ok, here is how its partially working on my web host.

I had images from digital camera which were really big in the range of 1.1 MB. So I did some search on the forum and the web to find a solution.

After much reading, I downloaded this nice little software called “IrfanView”. Then I downloaded all the plugins for the software.

-----After that, I opened my images in IrfanView.

-----Then, File -> Save For Web and set your size to something like 500×400 or in that range.

-----After that, change the quality to around 30% (according to your preference).

-----Finally save the image as ….

This will create a new image which will be around 30-50 KB in size. Now you should be able to upload your image without any issues.

Hope this helps someone…

Link to comment
Share on other sites

  • 1 month later...

I did a little easier fix, that should be inserted into the code I suppose.
The problem (for me at least) was that php:s finfo_open function can't find the magic.mime file that
helps out with the file identifying.
To the solution,
I changed the function in image.inc.php to this:

    if (function_exists('finfo_open'))
   {
       $finfo = @finfo_open(FILEINFO_MIME, "/etc/magic.mime");
       $mime_type = @finfo_file($finfo, $file['tmp_name']);
       @finfo_close($finfo);
   }



I added ,"/etc/magic.mime"
You can look for the file in your system with for example the locate-command:
locate magic.mime
or with find as a last resort:
find / -name magic.mime -print |grep magic.mime

// Fredrik

Link to comment
Share on other sites

  • 2 months later...
I did a little easier fix, that should be inserted into the code I suppose.
The problem (for me at least) was that php:s finfo_open function can't find the magic.mime file that
helps out with the file identifying.
To the solution,
I changed the function in image.inc.php to this:
    if (function_exists('finfo_open'))
   {
       $finfo = @finfo_open(FILEINFO_MIME, "/etc/magic.mime");
       $mime_type = @finfo_file($finfo, $file['tmp_name']);
       @finfo_close($finfo);
   }



I added ,"/etc/magic.mime"
You can look for the file in your system with for example the locate-command:
locate magic.mime
or with find as a last resort:
find / -name magic.mime -print |grep magic.mime

// Fredrik



Im sorry but i cant find any magic.mime file....any way you can bring it to us with a zip file???

Thanks
Link to comment
Share on other sites

  • 5 years 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...