Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Add on domain store = no images. Config = ok

    1.5.1 New store, No products, No mods. Yes, I have read all the other posts that have been made but none solve my issue.

    I have created an add on domain called myaddondomain.com (theoretical) to my main account mymainaccount.com. DNS has been changed and is revolving correctly. All image files are loaded to to the server. My config files appear to be fine however there arent any images showing ( not even the default ZC banner) in the front end nor back end of myaddondomain.com. In Firebug, I can see the image on the server (weird). Also I can load the image that are missing by placing using a direct link to them like this:

    http://myaddondomain.com/images/logo.gif

    I have installed ZC 1.5.1 in a sub directory called myaddondir so path to the add on store is /home/mymainaccount/public_html/myaddondir/

    My config files are listed below. I dont see any problems with them. Can you spot anything that would keep the images in the add on store from appearing?

    ************************ admin/includes/configure ************************
    define('HTTP_SERVER', 'http://www.myaddondomain.com');
    define('HTTPS_SERVER', 'https://www.myaddondomain.com');
    define('HTTP_CATALOG_SERVER', 'http://www.myaddondomain.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.myaddondomain.com');
    define('ENABLE_SSL_ADMIN', 'false');
    define('ENABLE_SSL_CATALOG', 'false');
    $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];

    define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
    define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
    define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

    define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
    define('DIR_FS_CATALOG', '/home/mymainaccount/public_html/myaddondir/');
    define('DIR_FS_LOGS', '/home/mymainaccount/public_html/myaddondir/logs');
    define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
    define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
    define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
    define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
    define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
    define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', '');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'mymainaccount_mysuername');
    define('DB_SERVER_PASSWORD', '123456789');
    define('DB_DATABASE', 'mymainaccount_dbName');
    define('SQL_CACHE_METHOD', 'file');
    define('DIR_FS_SQL_CACHE', '/home/mymainaccount/public_html/myaddondir/cache');


    ********************** /includes/configure.php ************************
    define('HTTP_SERVER', 'http://www.myaddondomain.com');
    define('HTTPS_SERVER', 'https://www.myaddondomain.com');

    define('ENABLE_SSL', 'false');

    define('DIR_WS_CATALOG', '/myaddondir/');
    define('DIR_WS_HTTPS_CATALOG', '/myaddondir/');

    define('DIR_WS_IMAGES', 'images/');
    define('DIR_WS_INCLUDES', 'includes/');
    define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
    define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
    define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
    define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
    define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

    define('DIR_WS_PHPBB', '/');

    define('DIR_FS_CATALOG', '/home/mymainaccount/public_html/myaddondir/');

    define('DIR_FS_LOGS', '/home/mymainaccount/public_html/myaddondir/logs');

    define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
    define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
    define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
    define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

    define('DB_TYPE', 'mysql');
    define('DB_PREFIX', '');
    define('DB_SERVER', 'localhost');
    define('DB_SERVER_USERNAME', 'mymainaccount_mysuername');
    define('DB_SERVER_PASSWORD', '123456789');
    define('DB_DATABASE', 'mymainaccount_dbName');

    define('SQL_CACHE_METHOD', 'file');
    define('DIR_FS_SQL_CACHE', '/home/mymainaccount/public_html/myaddondir/cache');

    **********************************************************************

    Thank you for any help...
    22 stores and counting! Ive been zenned.

  2. #2
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    A correction


    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');

    not


    define('DIR_WS_CATALOG', '/myaddondir/');
    define('DIR_WS_HTTPS_CATALOG', '/myaddondir/');


    By the way, if I access the add on store through my main domain like this: www.mymainaccount.com/myaddondir, All the images appear without any problems.



    Thank you
    Last edited by makenoiz; 9 Nov 2012 at 09:00 PM.
    22 stores and counting! Ive been zenned.

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Add on domain store = no images. Config = ok

    Code:
    /home/mymainaccount/public_html/myaddondir
    Are you sure about this??
    Did zc_install create this or did you manually edit this?

    Also
    Code:
    define('DIR_WS_CATALOG', '/myaddondir/');
    define('DIR_WS_HTTPS_CATALOG', '/myaddondir/');
    Should probably be
    Code:
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    Quote Originally Posted by kobra View Post
    Code:
    /home/mymainaccount/public_html/myaddondir
    Are you sure about this??
    Did zc_install create this or did you manually edit this?
    I created the add on account, server created the add on directory. I manually edited the ZC config files to accommodate the the new directory. Would that not be the correct path for an add on directory? Let me know what you think it should be and Ill try it.
    Also
    Code:
    define('DIR_WS_CATALOG', '/myaddondir/');
    define('DIR_WS_HTTPS_CATALOG', '/myaddondir/');
    Should probably be
    Code:
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    Yes, I think our posts crossed. That was a typo in my post. I do have
    Code:
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    in the config files...

    Sorry about that...

    Thanks for checking it out...
    22 stores and counting! Ive been zenned.

  5. #5
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Add on domain store = no images. Config = ok

    Most will be as this versus what you have
    Code:
    /home/public_html/myaddondir
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    hmmm, that didnt do it. Now I get the new installation page.... Thanks for trying ~!
    22 stores and counting! Ive been zenned.

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Add on domain store = no images. Config = ok

    hmmm, that didnt do it
    Copy/upload ZenCart to the directory & run install
    ZC will create correct configure.php files
    You can then import a Database if needed & upgrade if from an older version
    Zen-Venom Get Bitten

  8. #8
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    Will do thanks again.. Will post outcome.
    22 stores and counting! Ive been zenned.

  9. #9
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    Fresh install and same thing. I removed the following hotinking code from my htaccess and viola ! Images! I was hotlinking to myself ;) Keep in mind that this .htaccess file is located in the main domains root not the add ons root.

    Code:
    ## dissallow hotlinking
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mymainaccount.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
    Strange considering my addon has its own domain and I should be pulling images from that domains directory but I suppose, logically the add on domain is still considered part of mymainaccount.com by apache...!~

    Problem solved.
    22 stores and counting! Ive been zenned.

  10. #10
    Join Date
    Mar 2006
    Posts
    283
    Plugin Contributions
    0

    Default Re: Add on domain store = no images. Config = ok

    So if anyone runs into this, this is the anti hotlinking code to use if you are using an add on domain (replace the domain names with yours! )

    Code:
    ## dissallow hotlinking
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mymainaccount.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?myaddonaccount.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
    Otherwise, your addon domain store will not display images.....
    22 stores and counting! Ive been zenned.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Cat. images on homepage centerbox, i went to Config->Images but.....?
    By tcarden in forum Customization from the Admin
    Replies: 2
    Last Post: 5 Dec 2012, 10:30 PM
  2. v150 Admin/config, no My store
    By Wingrider in forum General Questions
    Replies: 1
    Last Post: 16 Jan 2012, 04:52 PM
  3. Test-store config files
    By jgold723 in forum General Questions
    Replies: 1
    Last Post: 20 Oct 2011, 02:41 PM
  4. Moving my yahoo site from domain.com/store to just domain.com ?
    By shanesoine in forum Basic Configuration
    Replies: 5
    Last Post: 27 Aug 2010, 07:14 AM
  5. Is it possible to add an images section to store without price/add to cart?
    By jdjohnson99 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Sep 2007, 04:37 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR