Zen Cart Logo
Forums / Other Business Topics / SSL is not allowing me to make changes

SSL is not allowing me to make changes

Views: 53

Results 1 to 6 of 6
25 Aug 2017, 12:19 PM
#1
drsysko avatar

drsysko

New Zenner

Join Date:
Aug 2017
Location:
AKL
Posts:
13
Plugin Contributions:
0

SSL is not allowing me to make changes

Hello

I have recently registered and installed my SSL Cert and that is working fine.

However when I try to make changes in zen cart while SSL is enabled, I cannot make any changes. E.g. I will remove the PayPal standard payment module and it will remove all the modules after I click on update.
When I disable SSL, I can uninstall the module successfully and install PayPal express.
This condition holds true for any change I am trying to make - SSL not allowing, but no SSL I can make changes and save them successfully.

Before I came here to place this post, I did some reading up and found this link:
https://www.zen-cart.com/content.php?56-how-do-i-enable-ssl-after-i-have-installed-zen-cart

From point 1 I can confirm I have a dedicated SSL
2 I can confirm SSL is working fine on my hosting account
3 Followed the steps exactly to enable SSL in Zen Cart

I can confirm that clearing cookies and not clearing cookies make no difference

I thought this could have something to do with SSL Cert in that I registered it without the www. but taking out the www makes no difference.
I even tried 2 rewrites in my .htaccess file where one line has www. and the next has just the domain name but no success.

I am really at a dead end and am not sure what I did wrong or how to fix this problem?

Can someone please help me?

Thanks
Wil

25 Aug 2017, 1:29 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SSL is not allowing me to make changes

Please provide your includes/configure.php and admin/includes/configure.php. Before posting do the following:
Once you select to reply or reply with quote and are ready to paste the code, select the # button from the messagebox toolbar. Then paste that code.
Then, obscure your DB_ credentials.
When pasting your admin version, in addition to the above, also obscure your admin directory name. (in ZC 1.5.1 and above, a properly updated system will not have that listed.)

26 Aug 2017, 10:38 AM
#3
drsysko avatar

drsysko

New Zenner

Join Date:
Aug 2017
Location:
AKL
Posts:
13
Plugin Contributions:
0

Re: SSL is not allowing me to make changes

Hi mc12345678

Thank you for your reply! Below are the files you asked for. Please note they are currently showing Enable SSL as false. This is due to the reason I mentioned in my initial post in that it's the only way I can save changes successfully.

<?php
/**
 * @package Configuration Settings circa 1.5.1
 * @copyright Copyright 2003-2012 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 2013-03-12 06:42:16
 */


/*************** 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', 'http://revo-illusion.com');
  define('HTTPS_SERVER', 'https://revo-illusion.com');

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

// 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', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  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', '/home3/revoillusion/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', '/home3/revoillusion/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', 'zc_');
  define('DB_CHARSET', 'utf8');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'x');
  define('DB_SERVER_PASSWORD', 'y');
  define('DB_DATABASE', 'revoillu_zncr1');

  // 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', '/home3/revoillusion/public_html/cache');

// EOF

admin/includes/configure.php

<?php
/**
 * @package Configuration Settings circa 1.5.1
 * @copyright Copyright 2003-2012 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 2013-03-12 06:42:16
 */


/*************** 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://revo-illusion.com');
  define('HTTPS_SERVER', 'https://revo-illusion.com');
  define('HTTP_CATALOG_SERVER', 'http://revo-illusion.com');
  define('HTTPS_CATALOG_SERVER', 'https://revo-illusion.com');

  // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_ADMIN', 'false');

  // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
  define('ENABLE_SSL_CATALOG', 'false');

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

// * DIR_FS_* = Filesystem directories (local/physical)
  define('DIR_FS_ADMIN', 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', '/home3/revoillusion/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', '/home3/revoillusion/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', 'zc_');
  define('DB_CHARSET', 'utf8');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'x');
  define('DB_SERVER_PASSWORD', 'y');
  define('DB_DATABASE', 'revoillu_zncr1');

  // 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', '/home3/revoillusion/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
26 Aug 2017, 11:44 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SSL is not allowing me to make changes

Okay, so as I understand from the above description. It has been stated that if were going to enable SSL (which is really just an internal ZC change to have it generate links to support https communication as applicable/necessary) that only the ENABLE_SSL define in each of the two files would be modified from false to true.

Well, there is also a change that should be made (even right now) to the admin/includes/configure.php file. The HTTP_SERVER should begin with https:. That is a prerequisite for some of the payment modules.

Now, why do I say that that should not cause any trouble? Because the site currently is using a htaccess redirect to force all links to be https:, but is not internally generating https links. Mind you the template also uses a number of interesting resources to where it could be that the external resource doesn't support https: and may otherwise need some sort of coding to prevent trying....

Anyways, it is important now to better understand what is meant about not being able to change anything. So far discussed is some issue with paypal standard as far as I could understand. Don't know what the issue is/was, but would be glad to better understand.

26 Aug 2017, 12:46 PM
#5
drsysko avatar

drsysko

New Zenner

Join Date:
Aug 2017
Location:
AKL
Posts:
13
Plugin Contributions:
0

Re: SSL is not allowing me to make changes

mc12345678:

Well, there is also a change that should be made (even right now) to the admin/includes/configure.php file. The HTTP_SERVER should begin with https:. That is a prerequisite for some of the payment modules.

Thank you so much! This has solved the problem. Only started using Zen-Cart for the first time from about a month ago I am still very fresh and as such am reading and watching YouTube vids as much as I can.

mc12345678:

Anyways, it is important now to better understand what is meant about not being able to change anything. So far discussed is some issue with paypal standard as far as I could understand. Don't know what the issue is/was, but would be glad to better understand.

What I was trying to explain was that when I go into Configuration -> Logging and then try to configure/change the log destination file it will leave the saved field as blank. I then try to change store DB queries from true to false and when I save it it shows a blank line (no true/false value). Only when I set Enable_SSL to false in my configure.php files, log back into my store and make the changes am I able to successfully save the changes.

However, I just changed my http server setting in the admin/includes/configure.php to use https and tried to enable/disable cod in payment module (as a test) and it works.

Once again many thanks for your help!!

26 Aug 2017, 6:49 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: SSL is not allowing me to make changes

drsysko:

Thank you so much! This has solved the problem. Only started using Zen-Cart for the first time from about a month ago I am still very fresh and as such am reading and watching YouTube vids as much as I can.

What I was trying to explain was that when I go into Configuration -> Logging and then try to configure/change the log destination file it will leave the saved field as blank. I then try to change store DB queries from true to false and when I save it it shows a blank line (no true/false value). Only when I set Enable_SSL to false in my configure.php files, log back into my store and make the changes am I able to successfully save the changes.

However, I just changed my http server setting in the admin/includes/configure.php to use https and tried to enable/disable cod in payment module (as a test) and it works.

Once again many thanks for your help!!
Very welcome. Now the other thing though is if you just started a few months ago, you should really consider upgrading the version of Zen Cart that you're using. ZC 1.5.1 was released some 5+ years ago. The current version is 1.5.5e and supports up to higher versions of PHP such as PHP 7.1.x. The lowest level of PHP that is supported basically speaking is PHP 5.6 and ZC 1.5.1 requires modifications to support higher than 5.3.x. ZC 1.5.5e will work in such a lower "environment" to support upgrading in place, but the php version should be upgraded once the site is identified as functional.

Upgrade by rebuild instructions: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading