Page 1 of 1

Possible? Shared image folder for 2 installs.

Posted: Fri Feb 21, 2014 10:08 am
by jason3w
I am trying to run 2 installs of Opencart off 1 database.
It's working so far, only the product images directory is not routing as expected.

Setup.
/opencart = main install
/pos = second install with config pointing to same database, and i've added
define('DIR_IMAGE', '/home/threewor/public_html/opencart/image/'); in config, but the images are still pointing to
pos/image/

I've got a similar setup working with my old cart, but not sure if it could work for opencart.

Any leads much appreciated.
Cheers
Jason

Re: Possible? Shared image folder for 2 installs.

Posted: Fri Feb 21, 2014 12:29 pm
by tacobandito
have you adjusted it in both config files? /admin/config.php & /config.php?

Re: Possible? Shared image folder for 2 installs.

Posted: Fri Feb 21, 2014 12:37 pm
by jason3w
Yep sure did :)

Re: Possible? Shared image folder for 2 installs.

Posted: Fri Feb 21, 2014 8:42 pm
by granddaddy
Did you also change the define HTTP_IMAGE that is in both files?

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 9:08 am
by jason3w
I don't see a line in config for HTTP_IMAGE granddaddy.
Is that something i need to specify?
Cheers

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 9:12 am
by jason3w
tried adding it, but no luck.

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 5:03 pm
by granddaddy
That's odd. Below is an example of a standard opencart config.php.
You can see 'image' entries in all three sections.
Does your config not look similar to this?

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://127.0.0.1/octest/');
define('HTTP_IMAGE', 'http://127.0.0.1/octest/image/');
define('HTTP_ADMIN', 'http://127.0.0.1/octest/admin/');

// HTTPS
define('HTTPS_SERVER', 'http://127.0.0.1/octest/');
define('HTTPS_IMAGE', 'http://127.0.0.1/octest/image/');

// DIR
define('DIR_APPLICATION', 'C:\UniformServer562\www\octest/catalog/');
define('DIR_SYSTEM', 'C:\UniformServer562\www\octest/system/');
define('DIR_DATABASE', 'C:\UniformServer562\www\octest/system/database/');
define('DIR_LANGUAGE', 'C:\UniformServer562\www\octest/catalog/language/');
define('DIR_TEMPLATE', 'C:\UniformServer562\www\octest/catalog/view/theme/');
define('DIR_CONFIG', 'C:\UniformServer562\www\octest/system/config/');
define('DIR_IMAGE', 'C:\UniformServer562\www\octest/image/');
define('DIR_CACHE', 'C:\UniformServer562\www\octest/system/cache/');
define('DIR_DOWNLOAD', 'C:\UniformServer562\www\octest/download/');
define('DIR_LOGS', 'C:\UniformServer562\www\octest/system/logs/');

// DB
define('DB_DRIVER', 'xxxxx');
define('DB_HOSTNAME', 'xxxxx');
define('DB_USERNAME', 'xxxxx');
define('DB_PASSWORD', 'xxxxx');
define('DB_DATABASE', 'xxxxx');
define('DB_PREFIX', 'xxxxx');
?>

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 5:40 pm
by jason3w
Found a post saying how it had been removed in 1.5.5
No-one knew why.
Also found this
http://forum.opencart.com/viewtopic.php?f=138&t=40573
Which teaches how to use a sub-domain for the images. Tried it out but no go still.
I'm on the very latest version. 1.5.6.1

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 6:02 pm
by jason3w

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 9:46 pm
by granddaddy
I didn't know it had been removed in 1.5.5. I use an earlier version.
Hopefully someone else with some experience can step in at this point and maybe help out with your problem.

Re: Possible? Shared image folder for 2 installs.

Posted: Mon Feb 24, 2014 9:53 pm
by granddaddy
Here's a possible clue that might lead somewhere...
I have noticed an oddity in CKeditor when I use sub-domains. When I insert an image into the editor it automatically assigns a url path to it - but for me it was always reverting to the main domain even though I was running OC from a sub-domain. I did find a config setting for CKeditor that is supposed to explicitly state the correct image path, but I couldn't get it to work myself.