Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default I broke my site after SSL installation

    Hello:

    I just migrated/upgraded/reinstalled a site from an old server/installation to a new one and after my host installed my SSL I somehow broke my site in the config file.

    All my links within the site are adding dir_ws_catalog onto them right after the name of my site.
    Example: mysite.comdir_ws_catalog or mysite.comdir_ws_catalogindex.php/mainpage=login...

    I have compared the files to originals and don't see where I have messed up. Can one of you extraordinary ZC developer gods please tell me where I've gone wrong? I've tried putting a trailing slash after them and that doesn't change anything. My admin area is working fine and it was working fine until I went in and changed https server after the SSL was installed but that shouldn't be affecting the entire site/catalog.

    My site is in public_html without a subfolder containing Zencart

    Here is a copy/paste from my admin>includes>configure.php
    define('HTTP_SERVER', 'http://mysite.com');
    define('HTTPS_SERVER', 'https://mysite.com');
    define('HTTP_CATALOG_SERVER', 'http://mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://mysite.com');


    And from my includes>configure.php

    define('HTTP_SERVER', 'http://mysite.com');
    define('HTTPS_SERVER', 'https://mysite.com');
    define('HTTP_CATALOG_SERVER', 'http://mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://mysite.com');

    I don't see what I'm missing! Please help!

    Thanks very much for your assistance!

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: I broke my site after SSL installation

    Quote Originally Posted by Kayla View Post
    Hello:

    I just migrated/upgraded/reinstalled a site from an old server/installation to a new one and after my host installed my SSL I somehow broke my site in the config file.

    All my links within the site are adding dir_ws_catalog onto them right after the name of my site.
    Example: mysite.comdir_ws_catalog or mysite.comdir_ws_catalogindex.php/mainpage=login...

    I have compared the files to originals and don't see where I have messed up. Can one of you extraordinary ZC developer gods please tell me where I've gone wrong? I've tried putting a trailing slash after them and that doesn't change anything. My admin area is working fine and it was working fine until I went in and changed https server after the SSL was installed but that shouldn't be affecting the entire site/catalog.

    My site is in public_html without a subfolder containing Zencart

    Here is a copy/paste from my admin>includes>configure.php
    define('HTTP_SERVER', 'http://mysite.com');
    define('HTTPS_SERVER', 'https://mysite.com');
    define('HTTP_CATALOG_SERVER', 'http://mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://mysite.com');


    And from my includes>configure.php

    define('HTTP_SERVER', 'http://mysite.com');
    define('HTTPS_SERVER', 'https://mysite.com');
    define('HTTP_CATALOG_SERVER', 'http://mysite.com');
    define('HTTPS_CATALOG_SERVER', 'https://mysite.com');

    I don't see what I'm missing! Please help!

    Thanks very much for your assistance!
    Nothing wrong with those parts of the configure files. Could you also post the rest of the files? With sensitive data (paswords etc) left out

  3. #3
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: I broke my site after SSL installation

    Also if your actual admin directory is in the file rename it in the post to admin. Further please wrap it in CODE tags generated by pressing the # symbol in the messagebox toolbar.

    From what is described it appears that you are missing a define for: DIR_WS_CATALOG
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default Re: I broke my site after SSL installation

    Quote Originally Posted by mc12345678 View Post
    Also if your actual admin directory is in the file rename it in the post to admin.
    For some reason I read this sentence and feel like it is a foreign language! LOL I'm not grokking what you're saying at all. I did rename my admin directory and have no problems in admin and I had no problems with the main site until I swapped out the https:// url from the development one.

  5. #5
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default Re: I broke my site after SSL installation

    Here is my admin>includes>configure.php

    Code:
    * @copyright Copyright 2003-2014 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 zc_install on 2015-05-01 08:39:54
     */
    
    
    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/
    
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'http://mysite.com');
      define('HTTPS_SERVER', 'https://mysite.com');
      define('HTTP_CATALOG_SERVER', 'http://mysite.com');
      define('HTTPS_CATALOG_SERVER', 'https://mysite.com');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'true');
    
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
    // 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_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/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/home/XXX/public_html/');
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      define('DIR_FS_LOGS', '/home/XXX/public_html/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 our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', '');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', 'XXX');
      define('DB_SERVER_PASSWORD', 'XXX');
      define('DB_DATABASE', 'XXX');
    
      // 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', '/home/XXX/public_html/cache');
    
    
    // Define the webserver and path parameters
      // Main webserver: eg-http://www.your_domain.com - 
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
      /* 
       * URLs for your site will be built via:  
       *     HTTP_SERVER plus DIR_WS_ADMIN or
       *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
       *     HTTP_SERVER plus DIR_WS_CATALOG or 
       *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
       * ...depending on your system configuration settings
       */
    // EOF

    And here is includes>configure.php

    Code:
    // 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', 'http://www.mysite.com');
      define('HTTPS_SERVER', 'https://www.mysite.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('HTTP_SERVER', 'http://www.mysite.com');
      define('HTTPS_SERVER', 'https://www.mysite.com');
    
      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', '/home/XXX/public_html/');
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
      define('DIR_FS_LOGS', '/home/XXX/public_html/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 our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', '');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
    XXX
      
      // 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', '/home/XXX/public_html/cache');
    
    // EOF

  6. #6
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default Re: I broke my site after SSL installation

    Ah, I think I know where the problem happened but I don't know the solution.

    When I was in development I had the installation in a directory /zc/ and I moved it out to the root of public_html and replaced /zc/ with just /

    What do I need to have there? // ?

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

  7. #7
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: I broke my site after SSL installation

    I see two strange things, but am not sure if it is the source of the problem.
    1: in the includes configure you define your sites uri's twice
    PHP Code:
    // 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''http://www.mysite.com');
      
    define('HTTPS_SERVER''https://www.mysite.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('HTTP_SERVER''http://www.mysite.com');
      
    define('HTTPS_SERVER''https://www.mysite.com'
    2: in your admin uri's there is no www, but in the includes configure they contain www

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

    Default Re: I broke my site after SSL installation

    Quote Originally Posted by Kayla View Post
    For some reason I read this sentence and feel like it is a foreign language! LOL I'm not grokking what you're saying at all. I did rename my admin directory and have no problems in admin and I had no problems with the main site until I swapped out the https:// url from the development one.
    As stated, wanted to be sure that you didn't post your admin directory to this site. Some people incorrectly upgrade and keep old versions of their configure.php which used to include the admin directory. It had nothing to do with asking you to rename the folder on your server.
    Quote Originally Posted by Design75 View Post
    I see two strange things, but am not sure if it is the source of the problem.
    1: in the includes configure you define your sites uri's twice
    PHP Code:
    // 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''http://www.mysite.com');
      
    define('HTTPS_SERVER''https://www.mysite.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('HTTP_SERVER''http://www.mysite.com');
      
    define('HTTPS_SERVER''https://www.mysite.com'
    2: in your admin uri's there is no www, but in the includes configure they contain www
    As suspected, you are missing from includes/configure.php the following:

    Code:
    define('DIR_WS_CATALOG', '/');
    To design75s comment on double defines, might get a logged error/warning message, but the value will take the first define.


    As to the www/no www. That will mostly depend on what your certificate is for and also how you want your site known on the internet...

    Further in your admin/includes/configure.php suggest the first server address to include https: now that you are securing your site....
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #9
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default Re: I broke my site after SSL installation

    Eureka! I found it! I was missing a / in the main config first URL after http:

  10. #10
    Join Date
    Mar 2005
    Posts
    198
    Plugin Contributions
    0

    Default Re: I broke my site after SSL installation

    It's so easy to get cross-eyed looking at this stuff at 1:30 in the morning! Thanks everyone for your willingness to help.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. URGENT HELP ME PLEASE!!!! Site broke after template switch?
    By linnx in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Jun 2009, 06:42 AM
  2. SSL After Installation
    By eplutons in forum Basic Configuration
    Replies: 1
    Last Post: 13 Jan 2009, 10:21 PM
  3. Enabling SSL after installation
    By friends1976 in forum General Questions
    Replies: 22
    Last Post: 7 Oct 2008, 08:07 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