Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2007
    Posts
    41
    Plugin Contributions
    0

    image problem url to image folder is wrong(where do i change it)?

    I have just upgraded to the latest version with a complete new install
    all is fine except the image folder is mapped to the wrong url (don't know why)
    and no images are showing in the admin side of the cart but show ok in the shop side.

    i have managed to work out my images are mapped to

    https://www.mysite.com/https:/webxxx...sgreenbox1.JPG


    i need to change this to the following

    http://www.mysite.com/myshop/images/...sgreenbox1.JPG

    can someone please tell me where i edit this code
    I have searched in other posts to no avail.

    Thank you
    Michelle

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: url to image folder is wrong(where do i change it)?

    Quote Originally Posted by michelleodin View Post
    I have just upgraded to the latest version with a complete new install
    all is fine except the image folder is mapped to the wrong url (don't know why)
    and no images are showing in the admin side of the cart but show ok in the shop side.

    i have managed to work out my images are mapped to

    https://www.mysite.com/https:/webxxx...sgreenbox1.JPG


    i need to change this to the following

    http://www.mysite.com/myshop/images/...sgreenbox1.JPG

    can someone please tell me where i edit this code
    I have searched in other posts to no avail.

    Thank you
    Michelle
    Please post your admin/includes/configure.php. Obscuring your admin directory if in plain text and your DB credentials.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jul 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: url to image folder is wrong(where do i change it)?

    Quote Originally Posted by mc12345678 View Post
    Please post your admin/includes/configure.php. Obscuring your admin directory if in plain text and your DB credentials.
    Thank you for your reply my config file is below.
    <?php
    /**
    * @package Configuration Settings
    * @copyright Copyright 2003-2016 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * File Built by Zen Cart Installer on Wed Apr 20 2016 20:21:58
    */


    /*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    /**
    * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
    */
    define('HTTP_SERVER', 'http://www.mysite.com');
    /**
    * Note about HTTPS_SERVER:
    * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
    */

    /**
    * Note about DIR_WS_ADMIN
    * The DIR_WS_ADMIN value is now auto-detected.
    * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
    */

    /**
    * Enter the domain for your storefront URL.
    * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
    */
    define('HTTP_CATALOG_SERVER', 'http://www.mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.mysite.com');

    /**
    * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
    */
    define('ENABLE_SSL_CATALOG', 'true');

    /**
    * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
    * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
    * They should always start and end with a slash ... ie: '/' or '/foldername/'
    */
    define('DIR_WS_CATALOG', '/shop/');
    define('DIR_WS_HTTPS_CATALOG', '/https:/web1xx.xxxx-secure.co.uk/mysite.com/shop/');

    /**
    * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
    * Should have a closing / on it.
    */
    define('DIR_FS_CATALOG', '/home/sites/mysite.com/public_html/shop/');

    /**
    * NOTE about DIR_FS_ADMIN
    * The value for DIR_FS_ADMIN is now auto-detected.
    * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
    */

    /**
    * The following settings define your database connection.
    * These must be the SAME as you're using in your non-admin copy of configure.php
    */
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'localhost'); // address of your db server
    define('DB_SERVER_USERNAME', 'xxxxxxxxx');
    define('DB_SERVER_PASSWORD', 'xxxxxx');
    define('DB_DATABASE', 'xxxxxx');

    /**
    * This is an advanced setting to determine whether you want to cache SQL queries.
    * Options are 'none' (which is the default) and 'file' and 'database'.
    */
    define('SQL_CACHE_METHOD', 'none');

    /**
    * Reserved for future use
    */
    define('SESSION_STORAGE', 'reserved for future use');

    /**
    * Advanced use only:
    * The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
    * To use them, uncomment AND add a proper defined value to them.
    */
    // define('DIR_FS_SQL_CACHE' ...
    // define('DIR_FS_DOWNLOAD' ...
    // define('DIR_FS_LOGS' ...

    // End Of File

  4. #4
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: url to image folder is wrong(where do i change it)?

    this is the problem child, shorten too /shop/
    Code:
    define('DIR_WS_HTTPS_CATALOG', '/https:/web1xx.xxxx-secure.co.uk/mysite.com/shop/');
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #5
    Join Date
    Jul 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: url to image folder is wrong(where do i change it)?

    Thank you for your reply.
    I changed the thread to define ('DIR_WS_HTTPS_CATALOG', '/shop/' ),
    And all is still the same no pictures in admin side.
    Michelle

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

    Default Re: url to image folder is wrong(where do i change it)?

    Code:
    * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
    */
    define('HTTP_SERVER', 'http://www.mysite.com');
    You are showing only a http to your site here and not following the instructions I have highlighted in red
    Probably should be
    Code:
    define('HTTP_SERVER', 'https:/web1xx.xxxx-secure.co.uk/mysite.com');
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jul 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: url to image folder is wrong(where do i change it)?

    Quote Originally Posted by kobra View Post
    Code:
    * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
    */
    define('HTTP_SERVER', 'http://www.mysite.com');
    You are showing only a http to your site here and not following the instructions I have highlighted in red
    Probably should be
    Code:
    define('HTTP_SERVER', 'https:/web1xx.xxxx-secure.co.uk/mysite.com');
    Thank you for your reply

    i changed */
    define('HTTP_SERVER', 'http://www.mysite.com');[/
    to
    define('HTTP_SERVER', 'https:/web1xx.xxxx-secure.co.uk/mysite.com');

    i have ssl on my front end shop but not admin so is the above correct.

    I still have no images in the admin end at all.

    thanks
    Michelle

  8. #8
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: url to image folder is wrong(where do i change it)?

    Hate to "rewind" things, but
    I have just upgraded to the latest version with a complete new install
    all is fine except the image folder is mapped to the wrong url (don't know why)
    and no images are showing in the admin side of the cart but show ok in the shop side
    Can you explain this condition a little?

    When you said a brand new install, to what extent were things brand new? Database? Files? Both?
    Where did the configure.php files come from? Ie. the fact that the original file had
    Code:
    define('DIR_WS_HTTPS_CATALOG', '/https:/web1xx.xxxx-secure.co.uk/mysite.com/shop/');
    How did that get there?

    As to the SSL in store side/admin, if it is enabled on the store side, why is/was it not to be enabled on the admin side? That said, now that the HTTP_SERVER constant has been redefined to point to a https address, it is in a way a moot point. ZC 1.5.5 will access all things via a secure connection just by having that setting in the Admin. Now, plugins, that's a potential different story...

    So, where are you expecting to see the images from the store front that you are not. Is it by some plugin installation or part of the base install? Perhaps you could also post your includes/configure.php (and an updated admin/includes/configure.php for comparison) to see what, if any, differences are important. Again, obscure your admin directory if provided and again obscure the DB credentials. Please press the # button in the messagebox toolbar just before pasting each set.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Jul 2007
    Posts
    41
    Plugin Contributions
    0

    Default Re: url to image folder is wrong(where do i change it)?

    Thank you for your reply.
    I installed a New install completely from fresh, new upload of newest zencart, new database, new configure files all fresh.

    I have never had ssl on the admin side, not sure now why but there was a reason given by my hosting company.
    With the ssl active i don't see any product images in the admin side, although they are on the front end side!
    So for now as a temp fix i have disabled the ssl altogether and my images show in the admin until i get the ssl working correctly.
    So should i enable ssl in both admin and frontend?
    My config files are as follows
    admin config
    Code:
    /*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.              ***********/
    
    /**
     * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
     */
    define('HTTP_SERVER', 'http://www.odinsminiatures.com');
    /**
     * Note about HTTPS_SERVER:
     * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
     */
    
    /**
     * Note about DIR_WS_ADMIN
     * The DIR_WS_ADMIN value is now auto-detected.
     * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
     */
    
    /**
     * Enter the domain for your storefront URL.
     * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
     */
    define('HTTP_CATALOG_SERVER', 'http://www.odinsminiatures.com');
    define('HTTPS_CATALOG_SERVER', 'https://www.odinsminiatures.com');
    
    /**
     * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
     */
    define('ENABLE_SSL_CATALOG', 'false');
    
    /**
     * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
     * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
     * They should always start and end with a slash ... ie: '/' or '/foldername/'
     */
    define('DIR_WS_CATALOG', '/odinsminiatureshop/');
    define('DIR_WS_HTTPS_CATALOG', '/odinsminiatureshop/');
    
    /**
     * This is the complete physical path to your store's files.  eg: /var/www/vhost/accountname/public_html/store/
     * Should have a closing / on it.
     */
    define('DIR_FS_CATALOG', '/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/');
    
    /**
     * NOTE about DIR_FS_ADMIN
     * The value for DIR_FS_ADMIN is now auto-detected.
     * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
     */
    
    /**
     * The following settings define your database connection.
     * These must be the SAME as you're using in your non-admin copy of configure.php
     */
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'localhost');  // address of your db server
    define('DB_SERVER_USERNAME', '******');
    define('DB_SERVER_PASSWORD', '*******');
    define('DB_DATABASE', '*******');
    
    /**
     * This is an advanced setting to determine whether you want to cache SQL queries.
     * Options are 'none' (which is the default) and 'file' and 'database'.
     */
    define('SQL_CACHE_METHOD', 'none');
    
    /**
     * Reserved for future use
     */
    define('SESSION_STORAGE', 'reserved for future use');
    
    /**
     * Advanced use only:
     * The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
     * To use them, uncomment AND add a proper defined value to them.
     */
    // define('DIR_FS_SQL_CACHE' ...
    // define('DIR_FS_DOWNLOAD' ...
    // define('DIR_FS_LOGS' ...
    
    // End Of File
    includes config
    Code:
    /*************** NOTE: This file is VERY similar to, but DIFFERENT from the "admin" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.              ***********/
    
    /**
     * Enter the domain for your store
     * HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
     * HTTPS_SERVER is your Secure/SSL webserver: eg-https://www.yourdomain.com
     */
    define('HTTP_SERVER', 'http://www.odinsminiatures.com');
    define('HTTPS_SERVER', 'https://www.odinsminiatures.com');
    
    /**
     *  If you want to tell Zen Cart to use your HTTPS URL on sensitive pages like login and checkout, set this to 'true'. Otherwise 'false'. (Keep the quotes)
     */
    define('ENABLE_SSL', 'false');
    
    /**
     * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
     * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
     * They should always start and end with a slash ... ie: '/' or '/foldername/'
     */
    define('DIR_WS_CATALOG', '/odinsminiatureshop/');
    define('DIR_WS_HTTPS_CATALOG', '/https:/web166.secure-secure.co.uk/odinsminiatures.com/odinsminiatureshop/');
    
    /**
     * This is the complete physical path to your store's files.  eg: /var/www/vhost/accountname/public_html/store/
     * Should have a closing / on it.
     */
    define('DIR_FS_CATALOG', '/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/');
    
    /**
     * The following settings define your database connection.
     * These must be the SAME as you're using in your non-admin copy of configure.php
     */
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'localhost');  // address of your db server
    define('DB_SERVER_USERNAME', '*******');
    define('DB_SERVER_PASSWORD', '*******');
    define('DB_DATABASE', '*******');
    
    /**
     * This is an advanced setting to determine whether you want to cache SQL queries.
     * Options are 'none' (which is the default) and 'file' and 'database'.
     */
    define('SQL_CACHE_METHOD', 'none');
    
    /**
     * Reserved for future use
     */
    define('SESSION_STORAGE', 'reserved for future use');
    
    /**
     * Advanced use only:
     * The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
     * To use them, uncomment AND add a proper defined value to them.
     */
    // define('DIR_FS_SQL_CACHE' ...
    // define('DIR_FS_DOWNLOAD' ...
    // define('DIR_FS_LOGS' ...
    
    // End Of File

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: url to image folder is wrong(where do i change it)?

    1. Why are you using the odinsminiatureshop folder at all?

    2. If you believe you need to keep the subdirectory (I wouldn't unless there's a clear business case), then these values will probably work:

    For admin:
    Code:
    define('HTTP_SERVER', 'https://web166.secure-secure.co.uk/odinsminiatures.com');
    define('ENABLE_SSL_CATALOG', 'true');
    For non-admin:
    Code:
    define('HTTP_SERVER', 'http://www.odinsminiatures.com');
    define('HTTPS_SERVER', 'https://web166.secure-secure.co.uk/odinsminiatures.com');
    define('ENABLE_SSL', 'true');
    For both:
    Code:
    define('DIR_WS_CATALOG', '/odinsminiatureshop/');
    define('DIR_WS_HTTPS_CATALOG', '/odinsminiatureshop/');
    
    define('DIR_FS_CATALOG', '/home/sites/odinsminiatures.com/public_html/odinsminiatureshop/');
    (might need to remove the final odinsminiatureshop/ from DIR_FS_CATALOG)
    Last edited by DrByte; 3 May 2016 at 07:11 PM. Reason: edit
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Where to Change the config.php file to point to new downloads folder?
    By jackibar in forum Templates, Stylesheets, Page Layout
    Replies: 73
    Last Post: 22 Dec 2011, 07:17 AM
  2. Folder redirect - installed into wrong folder
    By tenthmuse in forum General Questions
    Replies: 2
    Last Post: 31 May 2011, 11:48 PM
  3. Replies: 5
    Last Post: 15 Dec 2010, 11:05 PM
  4. Replies: 3
    Last Post: 13 Dec 2010, 05:28 PM
  5. Where is the image folder located in CSS
    By laurieudy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Jul 2008, 10:16 PM

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