Post by straightlight » Fri Jan 01, 2021 1:21 am

EvolveWebHosting wrote:
Thu Dec 31, 2020 10:45 pm
sw!tch wrote:
Thu Dec 31, 2020 6:46 pm
pprmkr wrote:
Thu Dec 31, 2020 5:18 pm
- When on PHP 8.0, GD uses class object instead of resource ( https://php.watch/versions/8.0/gdimage )
Since when is PHP 8.0 a recommend PHP version for Opencart 3.0.3.6? I suspect you will run into many other hidden issues aside for this under PHP 8. If it is related better stick with PHP 7.3.9 - 7.4 until full support is clarified.
-
Good point. I'd be willing to bet PHP 8 is not supported yet. Changing the PHP version to anything different is not going to solve the issue. It's the config.php files that have the wrong path specified.
It's not supported yet.

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 Masea » Fri Jan 15, 2021 11:54 am

pprmkr wrote:
Thu Dec 31, 2020 5:18 pm
- When GD not installed, OC fails to install.
- When paths are correct in config and images are present but no thumbs / resized images are created in cache, please check PHP version.
- When on PHP 8.0, GD uses class object instead of resource ( https://php.watch/versions/8.0/gdimage )
Edit system/library/image.php and on line 119 change:

Code: Select all

if (is_resource($this->image)) {
into:

Code: Select all

if (is_resource($this->image) || is_object($this->image)) {
This fixed it. Thank you so much!

Newbie

Posts

Joined
Mon Nov 02, 2020 6:07 pm

Post by ruskevychp22 » Mon Jun 28, 2021 5:22 pm

pprmkr wrote:
Thu Dec 31, 2020 5:18 pm
- When GD not installed, OC fails to install.
- When paths are correct in config and images are present but no thumbs / resized images are created in cache, please check PHP version.
- When on PHP 8.0, GD uses class object instead of resource ( https://php.watch/versions/8.0/gdimage )
Edit system/library/image.php and on line 119 change:

Code: Select all

if (is_resource($this->image)) {
into:

Code: Select all

if (is_resource($this->image) || is_object($this->image)) {
Thank you, it worked!

Newbie

Posts

Joined
Fri Aug 07, 2020 6:01 pm

Post by ohiokiwi » Wed Jul 28, 2021 11:56 pm

Thank you @PprMkr your code...

Code: Select all

Edit system/library/image.php and on line 119 change:
Code: Select all

if (is_resource($this->image)) {
into:
Code: Select all

if (is_resource($this->image) || is_object($this->image)) {
This fixed my problem with adding product images to OC 3.0.3.6

Newbie

Posts

Joined
Wed Mar 17, 2021 6:20 am

Post by kslakhani » Mon Jul 31, 2023 5:29 pm

pprmkr wrote:
Thu Dec 31, 2020 5:18 pm
- When GD not installed, OC fails to install.
- When paths are correct in config and images are present but no thumbs / resized images are created in cache, please check PHP version.
- When on PHP 8.0, GD uses class object instead of resource ( https://php.watch/versions/8.0/gdimage )
Edit system/library/image.php and on line 119 change:

Code: Select all

if (is_resource($this->image)) {
into:

Code: Select all

if (is_resource($this->image) || is_object($this->image)) {
Excellent, solved

Newbie

Posts

Joined
Wed Apr 05, 2017 11:33 pm

Post by paulfeakins » Mon Jul 31, 2023 7:58 pm

EvolveWebHosting wrote:
Thu Dec 31, 2020 10:45 pm
Good point. I'd be willing to bet PHP 8 is not supported yet. Changing the PHP version to anything different is not going to solve the issue. It's the config.php files that have the wrong path specified.
Only the Maintenance branch of OC3 supports PHP 8.

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


User avatar
Guru Member
Online

Posts

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

Post by dropaway » Thu Oct 12, 2023 6:03 pm

pprmkr wrote:
Thu Dec 31, 2020 5:18 pm
- When GD not installed, OC fails to install.
- When paths are correct in config and images are present but no thumbs / resized images are created in cache, please check PHP version.
- When on PHP 8.0, GD uses class object instead of resource ( https://php.watch/versions/8.0/gdimage )
Edit system/library/image.php and on line 119 change:

Code: Select all

if (is_resource($this->image)) {
into:

Code: Select all

if (is_resource($this->image) || is_object($this->image)) {
WORK FOR ME! Thank you!

Newbie

Posts

Joined
Sat Mar 01, 2014 2:31 am
Who is online

Users browsing this forum: No registered users and 99 guests