Page 1 of 1
Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:09 am
by giantseed
We recently had to switch to a new host and move the store to a subdomain (store.aquaponics.com). The store works in Firefox and Safari, but in IE it has issues with the images because there is an extra slash in the image path so it shows up as https:///store.aquaponics.com/image/cache/BV A-120x120.jpg. I've checked in the admin and the store URL is set to
https://store.aquaponics.com/. Any ideas?
Thanks!
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:16 am
by JAY6390
Open your config.php file, and search for the triple slashes in there. rename them to two and save, and that will fix the problem
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:22 am
by giantseed
I searched through the config.php for the store and admin both and there are no instances of 2 or 3 slashes together.
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:24 am
by JAY6390
Did you check both the admin and the main config.php files?
Feel free to post the configs here (editing out sensitive data of course)
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:29 am
by giantseed
I checked through both. here they are.
Main Config -
define('DIR_APPLICATION', '/home/aqua/public_html/store/catalog/');
define('DIR_SYSTEM', '/home/aqua/public_html/store/system/');
define('DIR_DATABASE', '/home/aqua/public_html/store/system/database/');
define('DIR_LANGUAGE', '/home/aqua/public_html/store/catalog/language/');
define('DIR_TEMPLATE', '/home/aqua/public_html/store/catalog/view/theme/');
define('DIR_CONFIG', '/home/aqua/public_html/store/system/config/');
define('DIR_IMAGE', '/home/aqua/public_html/store/image/');
define('DIR_CACHE', '/home/aqua/public_html/store/system/cache/');
define('DIR_DOWNLOAD', '/home/aqua/public_html/store/download/');
define('DIR_LOGS', '/home/aqua/public_html/store/system/logs/');
Admin config -
// HTTP
define('HTTP_SERVER', '');
define('HTTP_CATALOG', '');
define('HTTP_IMAGE', '');
// HTTPS
define('HTTPS_SERVER', '');
define('HTTPS_IMAGE', '');
// DIR
define('DIR_APPLICATION', '/home/aqua/public_html/store/dashboard/');
define('DIR_SYSTEM', '/home/aqua/public_html/store/system/');
define('DIR_DATABASE', '/home/aqua/public_html/store/system/database/');
define('DIR_LANGUAGE', '/home/aqua/public_html/store/dashboard/language/');
define('DIR_TEMPLATE', '/home/aqua/public_html/store/dashboard/view/template/');
define('DIR_CONFIG', '/home/aqua/public_html/store/system/config/');
define('DIR_IMAGE', '/home/aqua/public_html/store/image/');
define('DIR_CACHE', '/home/aqua/public_html/store/system/cache/');
define('DIR_DOWNLOAD', '/home/aqua/public_html/store/download/');
define('DIR_LOGS', '/home/aqua/public_html/store/system/logs/');
define('DIR_CATALOG', '/home/aqua/public_html/store/catalog/');
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:34 am
by JAY6390
Check in your main config.php file that you have the following
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://store.aquaponics.com/');
define('HTTP_IMAGE', 'http://store.aquaponics.com/image/');
define('HTTP_ADMIN', 'http://store.aquaponics.com/admin/');
define('HTTPS_SERVER', 'https://store.aquaponics.com/');
define('HTTPS_IMAGE', 'https://store.aquaponics.com/image/');
Also what version of OpenCart are you running?
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:39 am
by giantseed
I didn't have those lines, but when I added them I got these errors -
Notice: Constant HTTP_IMAGE already defined in /home/aqua/public_html/store/index.php on line 55
Notice: Constant HTTPS_SERVER already defined in /home/aqua/public_html/store/index.php on line 58
Notice: Constant HTTPS_IMAGE already defined in /home/aqua/public_html/store/index.php on line 59
And then this is the code from lines 54 - 63 from that index file:
define('HTTP_SERVER', $config->get('config_url'));
define('HTTP_IMAGE', HTTP_SERVER . 'image/');
if ($config->get('config_ssl')) {
define('HTTPS_SERVER', 'https://' . substr($config->get('config_url'), 7));
define('HTTPS_IMAGE', HTTPS_SERVER . 'image/');
} else {
define('HTTPS_SERVER', HTTP_SERVER);
define('HTTPS_IMAGE', HTTP_IMAGE);
}
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:40 am
by giantseed
When I do add in those couple lines you gave me the images do work again in IE.
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:47 am
by giantseed
and the store is in version 1.4.9.3
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 3:54 am
by giantseed
Just for shins and grins I deleted those couple of lines from the index.php file and it works fine. Do you know what those lines are for?
Re: Three slashes (/) in image path
Posted: Tue Apr 17, 2012 6:24 am
by JAY6390
hmm, really not sure then sorry. Those are to set the site url and the image url