Post by esigners » Mon May 31, 2021 2:36 pm

Hello,
I am working 1st time on Opencart. From back end when I upload any image (product, manufacturer) using the default popup image manager, it is showing image is uploaded and then showing broken image. Here is the screen shot.
https://ibb.co/DD1rs69

Once I login to the FTP and checked - the image is uploaded inside the 'image/catalog' folder properly but unable to upload 'image/cache/catalog' folder.
Using firebug I see that all images from back end to front are called from cache folder. I have already set cache folder permission to 777 but nothing helps. Please suggest to how to resolve this issue. Is there any way to disable image cache permanently so that images will be called directly from 'image/catalog' folder, not from cache folder?
Tanks.

Newbie

Posts

Joined
Mon May 31, 2021 2:21 pm

Post by wrick0 » Mon May 31, 2021 5:11 pm

are you sure your php settings are correct? upload_max_file_size etc. ? check your error logs (webserveR)

Active Member

Posts

Joined
Fri Jan 18, 2019 10:00 pm
Location - 127.0.0.1 @ The Netherlands

Post by straightlight » Mon May 31, 2021 6:29 pm

esigners wrote:
Mon May 31, 2021 2:36 pm
Hello,
I am working 1st time on Opencart. From back end when I upload any image (product, manufacturer) using the default popup image manager, it is showing image is uploaded and then showing broken image. Here is the screen shot.
https://ibb.co/DD1rs69

Once I login to the FTP and checked - the image is uploaded inside the 'image/catalog' folder properly but unable to upload 'image/cache/catalog' folder.
Using firebug I see that all images from back end to front are called from cache folder. I have already set cache folder permission to 777 but nothing helps. Please suggest to how to resolve this issue. Is there any way to disable image cache permanently so that images will be called directly from 'image/catalog' folder, not from cache folder?
Tanks.
OC version. Never to be set o n 0777. 0755 should be the highest recursively on specified folders from the install text file in the OC ZIP file downloaded from opencart.com .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by okeystm » Tue Nov 15, 2022 5:21 pm

No one ? Really? Same issue here . One day just stoped creating other image sizes for thumbnails . Deleted cache folder and I end up with no images at all on my products. So no cache images in folders. But one somehow have created product image in cache folder for only one product . Still no other image sizes for other thumbnails.

Newbie

Posts

Joined
Fri Mar 27, 2020 4:41 am

Post by ADD Creative » Tue Nov 15, 2022 5:51 pm

okeystm wrote:
Tue Nov 15, 2022 5:21 pm
No one ? Really? Same issue here . One day just stoped creating other image sizes for thumbnails . Deleted cache folder and I end up with no images at all on my products. So no cache images in folders. But one somehow have created product image in cache folder for only one product . Still no other image sizes for other thumbnails.
Check both your OpenCart and PHP error logs.

Cache Images are only created as needed so you would need to go to the product page for OpenCart to create the respective images. Other caches could affect this process.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ocjimmy » Tue Jan 03, 2023 12:17 am

Check your version of PHP. I recently upgraded the PHP version from 7.3 to 8.1. I thought everything was working but had not tried uploading a catalog image. With version 8.1, it was not creating the thumbnail in the cache folder. I reverted back to 7.3 and everything is working again.

I have not yet had a chance to debug the cache image creation but suspect there is a missing PHP module in version 8.1 that is present in 7.3. (i.e. the module that opencart uses to create thumbnails?)

Newbie

Posts

Joined
Thu Oct 15, 2020 8:48 pm

Post by emprisestar » Fri Nov 10, 2023 11:19 pm

I think GD Library does not work. So in the file \admin\model\tool\image.php, at line 31:
Above this line : if ($width_orig != $width || $height_orig != $height) {
Add a new line code as below:
copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);

Enjoy it.
Hoang D.
@minhhoangduc from freelancer.com

Newbie

Posts

Joined
Wed Aug 02, 2023 2:26 pm

Post by Elstor » Fri Jan 26, 2024 5:44 pm

emprisestar wrote:
Fri Nov 10, 2023 11:19 pm
I think GD Library does not work. So in the file \admin\model\tool\image.php, at line 31:
Above this line : if ($width_orig != $width || $height_orig != $height) {
Add a new line code as below:
copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);

Enjoy it.
Hoang D.
@minhhoangduc from freelancer.com
It was a good solution. My problem is that uploaded images are not converted to the correct size, for example in the search box or where small images we use. The images are used from the cache folder, the image title would be correct (https://elstor.no/image/cache/catalog/DEL120-60x60.jpg) but the original size remains. we using Opencart 3.0.3.2, Journal V3 theme, PHP8.0
Have you any ideas to solve this problem?
Thank you!

Newbie

Posts

Joined
Fri Dec 22, 2023 4:28 am

Post by ADD Creative » Fri Jan 26, 2024 6:22 pm

Elstor wrote:
Fri Jan 26, 2024 5:44 pm
emprisestar wrote:
Fri Nov 10, 2023 11:19 pm
I think GD Library does not work. So in the file \admin\model\tool\image.php, at line 31:
Above this line : if ($width_orig != $width || $height_orig != $height) {
Add a new line code as below:
copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);

Enjoy it.
Hoang D.
@minhhoangduc from freelancer.com
It was a good solution. My problem is that uploaded images are not converted to the correct size, for example in the search box or where small images we use. The images are used from the cache folder, the image title would be correct (https://elstor.no/image/cache/catalog/DEL120-60x60.jpg) but the original size remains. we using Opencart 3.0.3.2, Journal V3 theme, PHP8.0
Have you any ideas to solve this problem?
Thank you!
That's what that modification does. It will just copy the image if the resize doesn't work. OpenCart 3.0.3.2 in not fully compatible with PHP 8. One of the fixes added in later versions was a PHP 8 compatibility fix for image resizing.

https://github.com/opencart/opencart/co ... 9abe8229ce

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by IP_CAM » Fri Jan 26, 2024 6:25 pm

It was a good solution. My problem is that uploaded images are not converted to the correct size, for example in the search box or where small images we use. The images are used from the cache folder, the image title would be correct (https://elstor.no/image/cache/catalog/DEL120-60x60.jpg) but the original size remains. we using Opencart 3.0.3.2, Journal V3 theme, PHP8.0
Have you any ideas to solve this problem?
Thank you!
Well, your posting has been replied to already, if you're a legal Journal Theme User, you could contact Journal on this, or then, just better don't expect free assistance around here on such.
viewtopic.php?t=232933

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by paulfeakins » Fri Jan 26, 2024 6:57 pm

Elstor wrote:
Fri Jan 26, 2024 5:44 pm
we using Opencart 3.0.3.2, Journal V3 theme, PHP8.0
As above, OC 3.0.3.2 is not compatible with PHP 8.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Elstor » Sun Jan 28, 2024 2:01 am

ADD Creative wrote:
Fri Jan 26, 2024 6:22 pm
Elstor wrote:
Fri Jan 26, 2024 5:44 pm
emprisestar wrote:
Fri Nov 10, 2023 11:19 pm
I think GD Library does not work. So in the file \admin\model\tool\image.php, at line 31:
Above this line : if ($width_orig != $width || $height_orig != $height) {
Add a new line code as below:
copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);

Enjoy it.
Hoang D.
@minhhoangduc from freelancer.com
It was a good solution. My problem is that uploaded images are not converted to the correct size, for example in the search box or where small images we use. The images are used from the cache folder, the image title would be correct (https://elstor.no/image/cache/catalog/DEL120-60x60.jpg) but the original size remains. we using Opencart 3.0.3.2, Journal V3 theme, PHP8.0
Have you any ideas to solve this problem?
Thank you!
That's what that modification does. It will just copy the image if the resize doesn't work. OpenCart 3.0.3.2 in not fully compatible with PHP 8. One of the fixes added in later versions was a PHP 8 compatibility fix for image resizing.

https://github.com/opencart/opencart/co ... 9abe8229ce
I think this solution is working, thank you for the help!

Newbie

Posts

Joined
Fri Dec 22, 2023 4:28 am

Post by paulfeakins » Mon Jan 29, 2024 7:46 pm

Elstor wrote:
Sun Jan 28, 2024 2:01 am
I think this solution is working, thank you for the help!
So please now add [SOLVED] to the start of this topic title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Cue4cheap » Mon Jan 29, 2024 10:11 pm

paulfeakins wrote:
Mon Jan 29, 2024 7:46 pm
Elstor wrote:
Sun Jan 28, 2024 2:01 am
I think this solution is working, thank you for the help!
So please now add [SOLVED] to the start of this topic title.
Elstor isn't the topic starter.
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by paulfeakins » Tue Jan 30, 2024 11:55 pm

Cue4cheap wrote:
Mon Jan 29, 2024 10:11 pm
paulfeakins wrote:
Mon Jan 29, 2024 7:46 pm
Elstor wrote:
Sun Jan 28, 2024 2:01 am
I think this solution is working, thank you for the help!
So please now add [SOLVED] to the start of this topic title.
Elstor isn't the topic starter.
Mike
Indeed but if this does solve the issue then the OP should add [SOLVED].

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by TexasGreg » Sat Apr 06, 2024 2:57 am

emprisestar wrote:
Fri Nov 10, 2023 11:19 pm
I think GD Library does not work. So in the file \admin\model\tool\image.php, at line 31:
Above this line : if ($width_orig != $width || $height_orig != $height) {
Add a new line code as below:
copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new);

Enjoy it.
Hoang D.
@minhhoangduc from freelancer.com
This solved my problem. Thanks!

New member

Posts

Joined
Sun Nov 11, 2018 9:30 pm

Post by paulfeakins » Mon Apr 08, 2024 6:53 pm

TexasGreg wrote:
Sat Apr 06, 2024 2:57 am
This solved my problem. Thanks!
Great, I've added [SOLVED] seeing as the OP hasn't returned.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: lockiedownunder, o3445 and 82 guests