Post by Adrian99999 » Mon Jan 11, 2021 5:01 am

I have installed OpenCart on a localhost XAMPP implementation. It all works fine except that no images show other than on the banner. I have not begun any customisation. There are many posts regarding missing images and they mostly say to check DIR_IMAGE in config.php. On my site I have:

Code: Select all

define('DIR_IMAGE', 'C:/xampp/htdocs/opencart2/image/');
(this is the second time I've tried this: firstly with the Bitnami installation, then with a completely manual installation following the standard OpenCart process). My colleague also has exactly the same problem. This should work "straight out of the box". What have I missed?

All advice gratefully received.

User avatar
Newbie

Posts

Joined
Thu Jun 11, 2020 8:39 pm

Post by sw!tch » Mon Jan 11, 2021 5:16 am

PHP version? PHP error log?

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by mikeinterserv » Mon Jan 11, 2021 5:24 am

Adrian99999 wrote:
Mon Jan 11, 2021 5:01 am

Code: Select all

define('DIR_IMAGE', 'C:/xampp/htdocs/opencart2/image/');
Try

Code: Select all

define('DIR_IMAGE', '/xampp/htdocs/opencart2/image/');
Sorry I meant

Code: Select all

define('DIR_IMAGE', '/htdocs/opencart2/image/');
but try both

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

User avatar
Active Member

Posts

Joined
Sat Jan 08, 2011 11:05 pm
Location - Netherlands

Post by Adrian99999 » Tue Jan 12, 2021 2:59 am

Many thanks for the replies. I have fixed the issue. The link viewtopic.php?f=202&t=221484&p=809111#p809111 supplied by pprmkr contained the answer:

- 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)) {

User avatar
Newbie

Posts

Joined
Thu Jun 11, 2020 8:39 pm
Who is online

Users browsing this forum: No registered users and 102 guests