Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Basic Configuration / HTTPS not working

HTTPS not working

Started by fancyfrills on 8 Aug 2012, 10:51 AM · Views: 4,562

Results 1 to 20 of 21
8 Aug 2012, 10:51 AM
#1
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

HTTPS not working

I know this question has been asked a million times on here, but as I search through the results, I can find one that quite fits my problem. My http site works just fine. It is not until someone tries to checkout or sign up/sign into their account that problems arise. GoDaddy consistently tells me it is not their issue because the SSL is setup and performing correctly. Now when you click on login on my site, the URL is:

https://fancyinfrills.comhttps/index.php?main_page=login

After the .com there is no /. I think that is what is breaking my https because the same thing occurs when I try to checkout through the shopping cart. I have setup both configure.php files per the instructions on this site. Where am I going wrong? Thank you.

BTW: My site is www.fancyinfrills.com. It's still a work in progress.

8 Aug 2012, 2:18 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: HTTPS not working

Could you post, from the server, without the username and password, the file:
/includes/configure.php

it looks like there is something wrong ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Aug 2012, 3:22 PM
#3
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

I intentionally took out the database information.

Here it is:

<?php /** * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 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 2012-07-27 05:24:32 */ /*************** 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://www.fancyinfrills.com'); define('HTTPS_SERVER', 'https://www.fancyinfrills.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', '/'); define('DIR_WS_HTTPS_CATALOG', 'https:/'); 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', 'D:\Hosting\9600306\html\/'); 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', 'zen_'); define('DB_CHARSET', 'latin1'); define('DB_SERVER', ); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', '); define('DB_DATABASE', ''); // 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', ''); define('DIR_FS_SQL_CACHE', 'D:\Hosting\9600306\html\/cache'); // EOF
8 Aug 2012, 3:34 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: HTTPS not working

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

Should just be:

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

unless there's something really unusual about your server configuration.

8 Aug 2012, 5:03 PM
#5
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

That worked like a charm! Thanks. Now how can I set it up so that customers can access my site without typing the 'www'? I want them to be able to access it both ways (with 'www' and without).

8 Aug 2012, 11:42 PM
#6
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

Stevesh,

Since I made that change, I am not able to log into my admin page. I am getting the "Hello. Thank you for loading Zen Cart" screen. Do I need to make changes elsewhere?

8 Aug 2012, 11:48 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: HTTPS not working

The files:
/includes/configure.php
/your_admin_dir/includes/configure.php

are different ...

Can you post, from the server, without your username and password and not your real admin directory name if it shows in this file, the file:
/your_admin_dir/includes/configure.php

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Aug 2012, 11:31 AM
#8
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

Here is the admin/includes/configure.php:

<?php /** * SAMPLE dist-configure.php * * @package Configuration Settings * @package Admin * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: dist-configure.php 19644 2011-09-29 16:04:04Z wilt $ * @private */ /** * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for all 4 of the following, including the HTTP_ entries: */ define('HTTP_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_SERVER', 'https://www.fancyinfrills.com'); define('HTTP_CATALOG_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_CATALOG_SERVER', 'https://www.fancyinfrills'); // 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'); // 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', '/%%DIR%%/'); define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_CATALOG', '/%%DIR%%/'); 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_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__) . '/../') . '/'); define('DIR_FS_CATALOG', '%%FULLDIR%%/'); 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', 'zen_'); define('DB_SERVER', '%%DB_SERVER%%'); define('DB_SERVER_USERNAME', '%%DB_SERVER_USERNAME%%'); define('DB_SERVER_PASSWORD', '%%DB_SERVER_PASSWORD%%'); define('DB_DATABASE', '%%DB_DATABASE%%'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // 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', '%%FULLDIR%%/cache'); //Explanations of the webserver and path parameters: // HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com /* * URL's 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
11 Aug 2012, 12:43 PM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: HTTPS not working

You're missing the .com from one of your https definitions:

Fancyfrills:

Here is the admin/includes/configure.php:

<?php /** * SAMPLE dist-configure.php * * @package Configuration Settings * @package Admin * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: dist-configure.php 19644 2011-09-29 16:04:04Z wilt $ * @private */ /** * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for all 4 of the following, including the HTTP_ entries: */ define('HTTP_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_SERVER', 'https://www.fancyinfrills.com'); define('HTTP_CATALOG_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_CATALOG_SERVER', 'https://www.fancyinfrills.com'); ...
11 Aug 2012, 12:56 PM
#10
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

I added the '.com' but I am still not able to access my admin page.

11 Aug 2012, 1:11 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: HTTPS not working

How was your admin configure.php file created? It looks like you took a copy of the admin/includes/dist-configure.php and performed some partial editing. The values I've highlighted in red should have been replaced with the "real" values when you installed your cart on your host:

<?php
/**
* SAMPLE dist-configure.php
*
* @package Configuration Settings
* @package Admin
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: dist-configure.php 19644 2011-09-29 16:04:04Z wilt $
* @private
*/
/**
* WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
* To do that, make sure you use a "https:" URL for all 4 of the following, including the HTTP_ entries:
*/
define('HTTP_SERVER', 'http://www.fancyinfrills.com');
define('HTTPS_SERVER', 'https://www.fancyinfrills.com');
define('HTTP_CATALOG_SERVER', 'http://www.fancyinfrills.com');
define('HTTPS_CATALOG_SERVER', 'https://www.fancyinfrills');

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

// 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', '/%%DIR%%/');
define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
define('DIR_WS_HTTPS_CATALOG', '/%%DIR%%/');

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_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__) . '/../') . '/');
define('DIR_FS_CATALOG', '%%FULLDIR%%/');

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', 'zen_');
define('DB_SERVER', '%%DB_SERVER%%');
define('DB_SERVER_USERNAME', '%%DB_SERVER_USERNAME%%');
define('DB_SERVER_PASSWORD', '%%DB_SERVER_PASSWORD%%');
define('DB_DATABASE', '%%DB_DATABASE%%');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');

// 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', '%%FULLDIR%%/cache');


//Explanations of the webserver and path parameters:
// HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com
/*
* URL's 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 

The reason you can't access your admin is that none of the file-system or database settings are valid.

11 Aug 2012, 1:22 PM
#12
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

For what it's worth, whenever I posted the admin version of the configure.php file, I didn't have to change anything. They were already set to:

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', '%%DB_SERVER%%');
define('DB_SERVER_USERNAME', '%%DB_SERVER_USERNAME%%');
define('DB_SERVER_PASSWORD', '%%DB_SERVER_PASSWORD%%');
define('DB_DATABASE', '%%DB_DATABASE%%');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');

I changed the SERVER, USERNAME, PASSWORD, and DATABASE information to match that of the other configure.php file. I also changed the USE_PCCONNECT to 'true'. Do I need to change anything else or should I even change what I did?

11 Aug 2012, 1:25 PM
#13
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: HTTPS not working

Yes, change all occurrences of:

/%%DIR%%/ to /
%%FULLDIR%% to D:\Hosting\9600306\html\

11 Aug 2012, 1:25 PM
#14
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

lat9,

I was typing that last response at the same time you were. Up until now, the only changes I made to the configure file were changing the 'falses' to 'trues' to make the https content work. Can I replace those values you highlighted in red or do I need to completely start from scratch and reinstall everything?

11 Aug 2012, 1:26 PM
#15
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

I will give it a try. Thank you.

11 Aug 2012, 1:36 PM
#16
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

After making those changes, I no longer get the Zen Cart page. I now just get a plain white screen when trying to access my Admin page.

11 Aug 2012, 1:58 PM
#17
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: HTTPS not working

Please post your updated admin/includes/configure.php (without the actual database settings).

11 Aug 2012, 2:05 PM
#18
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

Here is my current Admin configure.php file:

<?php /** * SAMPLE dist-configure.php * * @package Configuration Settings * @package Admin * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: dist-configure.php 19644 2011-09-29 16:04:04Z wilt $ * @private */ /** * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for all 4 of the following, including the HTTP_ entries: */ define('HTTP_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_SERVER', 'https://www.fancyinfrills.com'); define('HTTP_CATALOG_SERVER', 'http://www.fancyinfrills.com'); define('HTTPS_CATALOG_SERVER', 'https://www.fancyinfrills.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'); // 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_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__) . '/../') . '/'); define('DIR_FS_CATALOG', 'D:\Hosting\9600306\html\'); 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', 'zen_'); define('DB_SERVER', 'XXXXXX'); define('DB_SERVER_USERNAME', 'XXXXX'); define('DB_SERVER_PASSWORD', XXXXXXXX'); define('DB_DATABASE', 'XXXXXXX'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'db'); // 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', 'D:\Hosting\9600306\html\'); //Explanations of the webserver and path parameters: // HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com /* * URL's 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 */
11 Aug 2012, 3:02 PM
#19
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,137
Plugin Contributions:
56

Re: HTTPS not working

Two changes (in red):

<?php
/**
* SAMPLE dist-configure.php
*
* @package Configuration Settings
* @package Admin
* @copyright Copyright 2003-2011 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: dist-configure.php 19644 2011-09-29 16:04:04Z wilt $
* @private
*/
/**
* WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
* To do that, make sure you use a "https:" URL for all 4 of the following, including the HTTP_ entries:
*/
define('HTTP_SERVER', 'http://www.fancyinfrills.com');
define('HTTPS_SERVER', 'https://www.fancyinfrills.com');
define('HTTP_CATALOG_SERVER', 'http://www.fancyinfrills.com');
define('HTTPS_CATALOG_SERVER', 'https://www.fancyinfrills.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');

// 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_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__) . '/../') . '/');
define('DIR_FS_CATALOG', 'D:\Hosting\9600306\html\/');

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', 'zen_');
define('DB_SERVER', 'XXXXXX');
define('DB_SERVER_USERNAME', 'XXXXX');
define('DB_SERVER_PASSWORD', XXXXXXXX');
define('DB_DATABASE', 'XXXXXXX');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');

// 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', 'D:\Hosting\9600306\html\/cache');


//Explanations of the webserver and path parameters:
// HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com
/*
* URL's 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
*/ 
11 Aug 2012, 3:34 PM
#20
fancyfrills avatar

fancyfrills

New Zenner

Join Date:
Jul 2012
Posts:
34
Plugin Contributions:
0

Re: HTTPS not working

I am in my admin panel now. A million 'Thank yous' to you lat9!