Post by boogdish » Tue Nov 22, 2022 4:14 am

Some basic info:
I'm using version 3.0.3.8 with the default theme. I haven't installed any new extensions/modifications
My webstore can be found at https://bartonmusicalcircuits.com/shop/ and I use iPage as my host

THE PROBLEM:
The problem is presenting itself in two places. First, product images are not showing up, and second, in the OC admin panel when trying to upload a new image or make a new image directory I get a "no such directory" error. The site appears to be working other than that, I received orders yesterday and was able to add a fake product today to make sure that functionality was still there.

The image files are still in the image/catalog/ directory. The odd thing is that my site's main logo is still loading, but nothing else. The logo and the product images are all stored in image/catalog, this makes me think that the path in config.php is set correctly since it's finding at least one image. I've recursively set the image folder's permissions to "755" and all files in image/catalog/ to "644." I've been clearing the caches on the OC dashboard as I've been trying different things.

I don't have any recent CGI error logs or any OpenCart error logs. Examining the elements of the page, the src info for the missing images is just " ".

Here is the top of my main config.php.

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://bartonmusicalcircuits.com/shop/');
// HTTPS
define('HTTPS_SERVER', 'https://bartonmusicalcircuits.com/shop/');

// DIR
define('DIR_APPLICATION', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/catalog/');
define('DIR_SYSTEM', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/system/');
define('DIR_IMAGE', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/image/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
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/');
And here's the config in my admin folder

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://bartonmusicalcircuits.com/shop/admin/');
define('HTTP_CATALOG', 'http://bartonmusicalcircuits.com/shop/');

// HTTPS
define('HTTPS_SERVER', 'https://bartonmusicalcircuits.com/shop/admin/');
define('HTTPS_CATALOG', 'https://bartonmusicalcircuits.com/shop/');

// DIR
define('DIR_APPLICATION', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/admin/');
define('DIR_SYSTEM', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/system/');
define('DIR_IMAGE', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/image/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_CATALOG', '/home/users/web/b723/ipg.bartonmusicalcircuit/shop/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/');
If anyone has any suggestions on things to try, I appreciate it!

Newbie

Posts

Joined
Tue Nov 22, 2022 3:06 am

Post by paulfeakins » Tue Nov 22, 2022 7:22 pm

Have you double-checked all those paths in your config files?

And have you checked with your host if Mod Security might be blocking uploads?

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 by mona » Tue Nov 22, 2022 7:37 pm

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://bartonmusicalcircuits.com/shop/');
// HTTPS
define('HTTPS_SERVER', 'https://bartonmusicalcircuits.com/shop/');

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://bartonmusicalcircuits.com/shop/admin/');
define('HTTP_CATALOG', 'https://bartonmusicalcircuits.com/shop/');

// HTTPS
define('HTTPS_SERVER', 'https://bartonmusicalcircuits.com/shop/admin/');
define('HTTPS_CATALOG', 'https://bartonmusicalcircuits.com/shop/');
ALL https://

and your haccess is not redirecting to https://
and you should decided wether it is www or non-www and do that in your haccess also

https://www.google.com/search?q=htacces ... e&ie=UTF-8

as Paul says check those paths
/home/users/web/b723/ipg.bartonmusicalcircuit/shop/image/
maybe wrong?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by boogdish » Wed Nov 23, 2022 12:18 am

Thank you for your help. It was a bad path, and I got my hataccess fixed up in the process.

If you're reading this with a similar problem and you're not sure how to check PHP paths, the method I used to check my path was one found in this stack overflow: https://stackoverflow.com/questions/122 ... erver-path
Specifically, I created a path.php file with the following code in it:

Code: Select all

 <?php 
    echo realpath('path.php'); 
?>
I uploaded that via FTP to my image folder, then opened it in my browser and it revealed that the actual path was not the one my host's cpanel was showing me!

Newbie

Posts

Joined
Tue Nov 22, 2022 3:06 am

Post by boogdish » Wed Nov 23, 2022 12:23 am

I'm not sure how to contact the mods on this forum, but it is not letting me modify the title of my original post to mark it solved. It says that the message contains spam.

Newbie

Posts

Joined
Tue Nov 22, 2022 3:06 am

Post by paulfeakins » Wed Nov 23, 2022 12:32 am

boogdish wrote:
Wed Nov 23, 2022 12:23 am
I'm not sure how to contact the mods on this forum, but it is not letting me modify the title of my original post to mark it solved. It says that the message contains spam.
We're always watching ;)

Not sure about the spam message but I've added the solved message for you this time.

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
Who is online

Users browsing this forum: No registered users and 416 guests