Jump to content

- PHP 5.2.9 (image management/upload broken)


Recommended Posts

According to the requirements listed on the PrestaShop site, the code
will not fully work with PHP 5.2.9 which is what my server is currently
running:

- PHP 5.2.9 (image management/upload broken)

Could someone elaborate so possibly I can advise my server on what specifically is not
working. Unfortunately I could not find anything on the site discussing
the problem.

Many Thanks
Lin Taylor

Link to comment
Share on other sites

Hi lintay!

You did not find anything about it on the forum because the requirements page has been updated very recently ;P
To answer your question, it is related to the GD library which is completly broken on that PHP version.
And the GD library is needed for PrestaShop image upload, which resize on the fly uploaded images.

Link to comment
Share on other sites

  • 3 months later...
I also had the image upload problem on php 5.2.9 . My host has updated to php 5.2.10 and I still have this problem. Can anyone please help me out how to get the image upload working?


If PHP's built in GD functions are still broken (and if that is definitely the issue you are having) but you can use something like ImageMagicK on your server via an exec(), you could theoretically rewrite the image class (and associated code) to use ImageMagicK instead. While not an insignificant change, the PrestaShop code from what I have seen so far is pretty clean and easy to read (yay for nice formatting!) and since most of the GD code has been encapsulated in a single class at least it is not hard to isolate what needs to change.

I show the following files have imagejpeg() references and of those, there are something like 5 calls total so it is not that much code to change:

./install/xml/uploadLogo.php
./modules/graphartichow/artichow/inc/drivers/gd.class.php
./modules/watermark/watermark.php
./images.inc.php

The nasty one of these would be "gd.class.php" which is from Artichow (a graphing library). Not sure how much that is used, might only be needed in the admin part of the site for reports and such so possibly you could skip changing that.

Cheers
Link to comment
Share on other sites

I also had the image upload problem on php 5.2.9 . My host has updated to php 5.2.10 and I still have this problem. Can anyone please help me out how to get the image upload working?


I have been trying help another forum member with image uploading through csv and he also has pgp 5.2.10.

It is definintly his server and not prestashop or the csv as I have it working fine on the same version.
Link to comment
Share on other sites

×
×
  • Create New...