Post by crosland » Wed Nov 01, 2023 2:17 am

I downloaded my 3.0.3.2 PHP 7 site to a local installation on Ubuntu in WSL2 (Windows Subsystem for Linux) and upgraded to 3.0.3.9 and PHP8.

Everything seems to be OK on the local site, accessed from Windows as localhost. Product images are displayed as expected.

I then uploaded the new files to my live site. The product images no longer appear. I see no errors in the error log.

I have read a number of forum posts about similar issues but have no solution yet.

The files are present in image/catalog and image/cache/catalog. Directory permissions are 755

Can anyone help?
Last edited by crosland on Mon Nov 06, 2023 7:55 pm, edited 1 time in total.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by Cue4cheap » Wed Nov 01, 2023 2:24 am

crosland wrote:
Wed Nov 01, 2023 2:17 am
I downloaded my 3.0.3.2 PHP 7 site to a local installation on Ubuntu in WSL2 (Windows Subsystem for Linux) and upgraded to 3.0.3.9 and PHP8.

Everything seems to be OK on the local site, accessed from Windows as localhost. Product images are displayed as expected.

I then uploaded the new files to my live site. The product images no longer appear. I see no errors in the error log.

Can anyone help?
What new files did you upload to the live site?
Was the live site the same 3.0.3.2?
Did you do an upgrade on the test site but then just copy files over the live site? i.e. what exactly did you do?

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by crosland » Wed Nov 01, 2023 3:23 am

My upgrade on the test site was not actually a true upgrade, I downloaded from the live 3.0.3.2 site to local and used Beyond Compare to compare the downloaded files to 3.0.3.9 and copied over the different files.

Then I uploaded the files from the test site to the live site.

You'll probably say I am an idiot :) but it's always worked in the past. Indeed, the local site seems to work just fine.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Wed Nov 01, 2023 4:23 am

I tried deleting the files in the live site image/cache/catalog but this made no difference. The cache files were NOT recreated, which is at odds with what other posters have said in the past. Maybe this is relevant to the issue.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by ADD Creative » Wed Nov 01, 2023 7:59 am

Check your config.php files. Maybe one of the paths it wrong or uses a symbolic link and not the real path.

www.add-creative.co.uk


Guru Member

Posts

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

Post by crosland » Wed Nov 01, 2023 5:10 pm

Thanks for replying. The paths are unchanged and are all correct.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by ADD Creative » Wed Nov 01, 2023 5:31 pm

Have you checked both the PHP and OpenCart error logs?

www.add-creative.co.uk


Guru Member

Posts

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

Post by crosland » Wed Nov 01, 2023 8:56 pm

Nothing in the error logs.

I have now done a real upgrade running the 3.0.3.9 install script.

I see the same result, the local site has all the correct images, the live site has no images.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Wed Nov 01, 2023 9:01 pm

If I try to upload an image to the live site I see a warning that he directory does not exist. Which directory could this be? Nothing the error log.

The live site displays the site logo which is in the image catalog, and the admin site displays the OC logo.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by khnaz35 » Thu Nov 02, 2023 4:12 pm

crosland wrote:
Wed Nov 01, 2023 9:01 pm
If I try to upload an image to the live site I see a warning that he directory does not exist. Which directory could this be? Nothing the error log.
Are you trying to upload from the admin? Did you trying using browser or FTP to look into the location where you are trying to upload if it exisit?
As from your previous post i can see that you mentioned both Php logs are clear and catalog config.php and admin/config.php files are fine you may want to run a small test on the server. create a new directory and then upload in image into it and assigane to the path and let us know back.

Got an urgent question that’s keeping you up at night? There might just be a magical inbox ready to help: khnaz35@gmail.com
Enjoy nature ;) :) :-*


User avatar
Active Member

Posts

Joined
Mon Aug 27, 2018 11:30 pm
Location - Malaysia

Post by crosland » Thu Nov 02, 2023 5:22 pm

Thanks for replying. I created a new image directory, uploaded the images and adjusted the paths in the site and admin config.php files. Dir permissins are 755, file permissions are 644.

It made no difference :(

I have rebuilt the site locally from a fresh 3.0.3.9 installation. I hope this will work when I upload it layet today.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Thu Nov 02, 2023 7:06 pm

I rebuilt my site from a fresh 3.0.3.9 download and got it working locally.

Upload the files it to my host and I STILL have no images.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by ADD Creative » Thu Nov 02, 2023 8:00 pm

If you upload an image to image/cache/catalog directory using FTP and go to the URL that would point to the image in a browser, do you see the image? The URL would be something like example.com/image/cache/catalog/test.png.

www.add-creative.co.uk


Guru Member

Posts

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

Post by Cue4cheap » Thu Nov 02, 2023 8:10 pm

With the paypal issue you are also reporting and this issue I would seriously try and find all logs and make sure you are not missing errors. Just seems odd you are having two unique issues and nothing is being logged anywhere.
Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by crosland » Fri Nov 03, 2023 1:34 am

I am now pretty sure this is a PHP issue. My host is on PHP8.2.12

I temporarily downgraded my hosting to PHP 7 to check a few things with a 3.0.3.2 based version of my site.

I then upgraded back to PHP 8 and uploaded the 3.0.3.9 based site. The thing is that the PHP upgrade takes a little time so I was initially seeing a few messages on my site to the effect that PHP7.3+ is required, and phpinfo() still reported version 7. During this time the images were visible. Once the PHP upgrade was effective the images no longer showed.

I have asked my host for access to the PHP error logs as I cannot find them anywhere.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Fri Nov 03, 2023 2:39 am

ADD Creative wrote:
Thu Nov 02, 2023 8:00 pm
If you upload an image to image/cache/catalog directory using FTP and go to the URL that would point to the image in a browser, do you see the image? The URL would be something like example.com/image/cache/catalog/test.png.
I thought I had answered this, but can't see my post. Yes, if I upload a new file with FTP (FileZilla) I can see the image in my browser. In fact, I can see all the existing images in my browser.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Fri Nov 03, 2023 7:53 pm

Unfortunately, it is not possible to access the error logs on Easyspace shared hosting. I have explained the problem to customer support in the hope they can help.

In the meantime they suggested:

Code: Select all

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
which I added to index.php for the site and admin pages. It did not result in any extra error messages.

When I try to use the Image Manager to upload a new image I get a pop-up "<my site> says: Warning: Directory does not exist!". The same if I try to add a new folder. The image folders exist and are all set to 777 so should be writeable. I can see the images in a browser. The site logo and favicon ARE displayed so OC can access the image folder(s).

Could it be a DB issue, is the image path saved there? I don't think so, since I am using the same DB in my localhost test site (exported/imported with phpmyadmin).

I appreciate the help so far.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by ADD Creative » Fri Nov 03, 2023 10:46 pm

You could your image path is not a link symbolic link. OpenCart doesn't support them. https://github.com/opencart/opencart/is ... -445496224

www.add-creative.co.uk


Guru Member

Posts

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

Post by crosland » Fri Nov 03, 2023 11:00 pm

Thanks for the reply.

config.php for admin (obfuscated to replace real admin dir name and site url) is:

Code: Select all

// DIR
define('DIR_APPLICATION', '/vhost/vhost14/s/p/r/my site/www/admin/');
define('DIR_SYSTEM', '/vhost/vhost14/s/p/r/my site/www/system/');
define('DIR_IMAGE', '/vhost/vhost14/s/p/r/my site/www/image/');
define('DIR_STORAGE', '/vhost/vhost14/s/p/r/my site/storage/');
define('DIR_CATALOG', '/vhost/vhost14/s/p/r/my site/www/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
Paths on the hosting server are not symbolic links. The same paths worked fine with 3.0.3.2/PHP7

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm

Post by crosland » Sat Nov 04, 2023 1:33 am

ADD Creative wrote:
Fri Nov 03, 2023 10:46 pm
You could your image path is not a link symbolic link. OpenCart doesn't support them. https://github.com/opencart/opencart/is ... -445496224
Thank you! I tried your fix and it is a partial success! Images now appear in the admin product pages.

I still cannot upload a new image. Same error as before, directory does not exist.

Images on the public shop site still do not appear. I cleared the browser cache and the host cache, before checking :)

Are there other places where a similar fix can be applied?

It worked on the same site with 3.0.3.2/PHP7 with the same paths. I have asked my host whether upgrading to PHP8 involved adding a sym link to my files.

Active Member

Posts

Joined
Fri Sep 13, 2019 9:04 pm
Who is online

Users browsing this forum: No registered users and 9 guests