Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2006
    Posts
    16
    Plugin Contributions
    0

    Default Paths not working?

    Probably not zen-cart related, but was wondering if anyone's seen this. Paths don't work. E.g. src="images/example.jpg" doesn't go to:
    https://www.site.com/shop/images/example.jpg

    it's looking here:
    https://www.site.com/www.site.com/sh...es/example.jpg

    Full paths also don't work, src="/images/example.jpg" doesn't go to:
    https://www.site.com/images/example.jpg

    It trying to find it here instead:
    https://images/example.jpg


    The cart worked fine months ago, but when I had to install a new SSL cert, I had major problems. Everything looked okay, but I couldn't login, or add items to the cart. Tried everything in the forums, finally reinstalled the cert. restarted the server, and viola, I could login, but now my paths are all jacked up. Nothing in .htaccess files, it seems like an apache thing, but I've no clue what to do...

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Paths not working?

    First off why are you set to access at https versus http

    Might post your store side configure.php file contents

    Use the <> code tags
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Apr 2006
    Posts
    16
    Plugin Contributions
    0

    Default Re: Paths not working?

    Forgot to mention... it looks like it's only happening with https. Since at some point in checkout, it's gotta go to https, I have to get it work, since anything with href, or src gets affected (i.e. links, css, and images).

    ...i'll post the config in a minute.

  4. #4
    Join Date
    Apr 2006
    Posts
    16
    Plugin Contributions
    0

    Default Re: Paths not working?

    PHP Code:
    <?PHP
    /**
     * @package Configuration Settings circa 1.3.8
     * @copyright Copyright 2003-2007 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0
     */


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

    // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      
    define('HTTP_SERVER''https://www.site.com');
      
    define('HTTPS_SERVER''https:/www.site.com');

      
    // Use secure webserver for checkout procedure?
      
    define('ENABLE_SSL''true');

    // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
    // * DIR_WS_* = Webserver directories (virtual/URL)
      // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
      
    define('DIR_WS_CATALOG''/shop/');
      
    define('DIR_WS_HTTPS_CATALOG''/shop/');

      
    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''/');

    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      
    define('DIR_FS_CATALOG''/var/www/vhosts/site.com/httpdocs/shop/');

      
    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 our database connection
      
    define('DB_TYPE''mysql');
      
    define('DB_PREFIX''');
      
    define('DB_SERVER''127.0.0.1');
      
    define('DB_SERVER_USERNAME''xxx');
      
    define('DB_SERVER_PASSWORD''xxx');
      
    define('DB_DATABASE''xxx');
      
    define('USE_PCONNECT''false');
      
    define('STORE_SESSIONS''db');
      
    // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

      // The next 2 "defines" are for SQL cache support.
      // For SQL_CACHE_METHOD, you can select from:  none, database, or file
      // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
      // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
      // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
      
    define('SQL_CACHE_METHOD''none'); 
      
    define('DIR_FS_SQL_CACHE''/var/www/vhosts/site.com/httpdocs/shop/cache');

    // EOF
    Last edited by quixotic; 27 Mar 2011 at 07:03 PM.

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

    Default Re: Paths not working?

    Did you attempt to manually edit/enter these or allow the installer to do so??
    Code:
      define('HTTP_SERVER', 'https://www.site.com');
      define('HTTPS_SERVER', 'https:/www.site.com');
    Missing a "/" there

    Code:
    // * DIR_FS_* = Filesystem directories (local/physical)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/var/www/vhosts/site.com/httpdocs/shop/');
    Are you sure that this is your correct path???
    var, www, and vhosts are normally replaced with your actual variables for them


    Code:
    define('DB_SERVER', '127.0.0.1');
    127.0.0.1 is usually "localhost" but is this is working leave it alone
    Zen-Venom Get Bitten

  6. #6
    Join Date
    Apr 2006
    Posts
    16
    Plugin Contributions
    0

    Default Re: Paths not working?

    unbelievable... I must've looked at that file a few dozen times, and for some reason never saw the missing backslash. so sorry to waste your time, but yeah, that was it. Thank you so much for pointing it out, I really appreciate it.

    For what it's worth the latter half, the /var/www/vhosts/... is correct. It's PLESK's default directory structure (at least in CentOS), and it's where it places all of it's virtual hosts.
    Last edited by quixotic; 28 Mar 2011 at 08:38 AM.

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

    Default Re: Paths not working?

    I would suggest that you change this as Zen Cart is smart enough to auto switch for only those pages that require https
    Code:
      define('HTTP_SERVER', 'http://www.site.com');
      define('HTTPS_SERVER', 'https://www.site.com');
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Paths, Paths, Paths
    By gabstero in forum General Questions
    Replies: 2
    Last Post: 10 Sep 2013, 06:27 PM
  2. v150 Admin Log In Not Working, User Log In Not Working All of a Sudden
    By SpydSpyder in forum General Questions
    Replies: 7
    Last Post: 15 Oct 2012, 05:34 AM
  3. add to cart not working...currency not working
    By pcdesigns in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 12 Jun 2008, 05:03 AM
  4. Paths
    By Shooters in forum Basic Configuration
    Replies: 4
    Last Post: 1 Mar 2008, 03:17 AM

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