Forums / Installing on a Linux/Unix Server / How to enable SSL for the whole site during customers log in?

How to enable SSL for the whole site during customers log in?

Locked

Views: 7,002

Results 1 to 20 of 28
This thread is locked. New replies are disabled.
13 Jun 2008, 11:02 AM
#1
akidworld avatar

akidworld

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

How to enable SSL for the whole site during customers log in?

Hi guys,

I have a question, been searching high and low at this forum. Hope someone can guide me where i can find the answer on how to create and main SSL session for the whole store.

Currently, i have my ssl installed for the my account, whole admin, checkout and checkout success pages. However, i would like to if piossible if a customer log in, he will be in the ssl environment everywhere in my store. As now, when he/she log in, the page requesting username & password, the whole my account, and checkout and checkout success are in ssl. When he/she browse other place of my site or decide to browse the catalog or suddenly change his mind and want to shop again, he will get out and in a non-ssl pages. And when he comes back to the my account etc, he will be in ssl again.

So how exactly i can maintain this customer all the time in ssl as long as he logged in or not time out. So many thanks in advance and sorry for my long description.

Jeremy

14 Jun 2008, 7:12 AM
#3
akidworld avatar

akidworld

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Thanks chuck,

That was one of the guide i use when installing my ssl.

My ssl is fine i think but the problem is that when people log in, they will be in ssl. But when they start browsing items or the site, then they are not in ssl. When they click of add to cart of an item, they go to the shopping cart which is not in ssl. but if the click the checkout, then they will be in ssl again.

So actually i am looking for answer on how to make them stay in ssl after they logged in or at least when they click add to cart, they will be in ssl. because when in shopping cart (mine at least) is displaying their address @ the shipping estimator, so this will customer complaint. i get one actually.

so please if anybody who can help.

Jeremy

14 Jun 2008, 7:54 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

Turn off the shipping estimator & they have to select checkout(SSL) - to see shipping for their full order

Zen-Venom Get Bitten

19 Jun 2008, 4:26 PM
#5
akidworld avatar

akidworld

New Zenner

Join Date:
Jun 2008
Posts:
17
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Thanks kobra. you are a life saver. sorry for my late reply.

cheers!

5 Nov 2008, 10:02 PM
#6
romanson3625 avatar

romanson3625

New Zenner

Join Date:
Nov 2007
Location:
New York City
Posts:
18
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

I enabled my ssl and nothing happens. It does not forward the page to "https" rather it stays on the "http" page. Also when I manually put in "https" in the address bar, the site loads with a padlock but there is a slash on the padlock.

Any help would be appreciated.

Boruch I. Hatanian

https://www.HeyYouBaby.com

6 Nov 2008, 7:04 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

RomanSon3625,

When I checked your link was broken

Zen-Venom Get Bitten

9 Nov 2008, 3:53 PM
#8
romanson3625 avatar

romanson3625

New Zenner

Join Date:
Nov 2007
Location:
New York City
Posts:
18
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Try it again. I fxed the link. Thanks cobra

Boruch I. Hatanian

https://www.HeyYouBaby.com

9 Nov 2008, 6:30 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

RomanSon3625,

A couple of things:
Your cert is issued to https://www.heyyoubaby.com and your configure.php's are pointed to heyyoubaby.com without the www
if you enter (space is mine)
https: //www.heyyoubaby.com you will take care of part of the problem
Additionally, edit you /includes/configure.php file and add the www. and set the ssl=true

Now the images you have on the main page center and I assume that these are in your define main_page.php setup have hard coded paths to http: you need to make all of these relative links

Zen-Venom Get Bitten

9 Nov 2008, 6:55 PM
#10
romanson3625 avatar

romanson3625

New Zenner

Join Date:
Nov 2007
Location:
New York City
Posts:
18
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Thank You again Kobra. you seem to be the only one that knows what he's talking about.

I configured my configure.php to http://www.heyyoubaby.com and I am still having the same problem. I tried changing the whole site to https://www.heyyoubaby.com but that did not seem to work either....

Again thanks for your help.

Boruch I. Hatanian

https://www.HeyYouBaby.com

9 Nov 2008, 11:00 PM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

Check that what you edited was actually uploaded...

Your site is still resolving to the non www variant suggesting that your edits are not actually there.

Zen-Venom Get Bitten

10 Nov 2008, 4:08 PM
#12
romanson3625 avatar

romanson3625

New Zenner

Join Date:
Nov 2007
Location:
New York City
Posts:
18
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

They should be. Because when I save it and go back to edit it, it shows that it had been saved.

Maybe I am doing something wrong?

Boruch I. Hatanian

https://www.HeyYouBaby.com

10 Nov 2008, 6:08 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

I would tend to agree...check your private messages

Zen-Venom Get Bitten

13 Nov 2008, 2:53 AM
#14
gizmo_girl avatar

gizmo_girl

Zen Follower

Join Date:
Nov 2007
Location:
Texas
Posts:
286
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Kobra,
I hope you can help me, as well. I am having trouble enabling SSL on my site (https://www.kings-kreations.com).

Here are my problems. I have edited the following files:

includes/configure.php

// Define 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
define('HTTP_SERVER', 'http://www.kings-kreations.com');
define('HTTPS_SERVER', 'https://www.kings-kreations.com');

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

admin/includes/configure.php

define('HTTP_SERVER', 'http://www.kings-kreations.com');
define('HTTPS_SERVER', 'https://www.kings-kreations.com');
define('HTTP_CATALOG_SERVER', 'http://www.kings-kreations.com');
define('HTTPS_CATALOG_SERVER', 'https://www.kings-kreations.com');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'true');
define('ENABLE_SSL_ADMIN', 'true');

After I altered & uploaded these files, I got the following message trying to log in or go to checkout:
Firefox can't find the server at https://www.kings-kreations.comhttps.

The next problem I have is my site looks all wrong if you access pages using https. For example, go to http://www.kings-kreations.com/zen and see what my home page looks like. Now try https://www.kings-kreations.com/zen and see the home page. No idea what has happened there, but that happens on every single page I try to access using https. Do you know why & how to fix it?

Thanks in advance for any help you can offer!
Mindy

13 Nov 2008, 6:09 AM
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

gizmo_girl,

From what you posted as edits these look correct BUT there must be some other mis-edit as the path(spaces mine)
"www . kings-kreations.comhttps"
Where the htpps is at the end is incorrect

Zen-Venom Get Bitten

13 Nov 2008, 6:32 AM
#16
gizmo_girl avatar

gizmo_girl

Zen Follower

Join Date:
Nov 2007
Location:
Texas
Posts:
286
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

Any suggestions on other possible files I need to look at?

Also, would you have any ideas on why my site displays correctly with http, but not with https (links in prev post)?
Posted via Mobile Device

13 Nov 2008, 6:35 AM
#17
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

You could post the configure.php contents and xxx out the sensitive info for the DB

Zen-Venom Get Bitten

13 Nov 2008, 1:20 PM
#18
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: How to enable SSL for the whole site during customers log in?

go down to where it shows

define('DIR_WS_HTTPS_CATALOG', 'https');

and make sure that it looks like this

define('DIR_WS_HTTPS_CATALOG', '/');

I betting thats wherer the issue lies,
since its trying to add the https directly to the end of the url and without a /

Zen cart PCI compliant Hosting

13 Nov 2008, 3:26 PM
#19
gizmo_girl avatar

gizmo_girl

Zen Follower

Join Date:
Nov 2007
Location:
Texas
Posts:
286
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

go down to where it shows

define('DIR_WS_HTTPS_CATALOG', 'https');

and make sure that it looks like this

define('DIR_WS_HTTPS_CATALOG', '/');

I betting thats wherer the issue lies,
since its trying to add the https directly to the end of the url and without a /

In both files it showed

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

I changed it to:

define('DIR_WS_HTTPS_CATALOG', '/');

I am now receiving this error message when you attempt to log in:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'login@localhost' (Using password: YES) in /home3/mindy/kings-kreations-www/core/class.php on line 16
MySQL error!

13 Nov 2008, 3:36 PM
#20
gizmo_girl avatar

gizmo_girl

Zen Follower

Join Date:
Nov 2007
Location:
Texas
Posts:
286
Plugin Contributions:
0

Re: How to enable SSL for the whole site during customers log in?

You could post the configure.php contents and xxx out the sensitive info for the DB

Here are the files:

includes/configure.php

<?php /** * * @package Configuration Settings * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> 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.yourdomain.com> // HTTPS_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> define('HTTP_SERVER', 'http://www.kings-kreations.com'); define('HTTPS_SERVER', 'https://www.kings-kreations.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', '/zen/'); 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', '/home/mindy/kings-kreations-www/zen/'); 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', 'localhost'); define('DB_SERVER_USERNAME', '**********'); define('DB_SERVER_PASSWORD', '**********'); define('DB_DATABASE', 'kings_kreations_com'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'db'); // 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', '/home/mindy/kings-kreations-www/zen/cache'); ?>

admin/includes/configure.php

<?php // /** * * @package Configuration Settings * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 */ /*************** 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. ***********/ // Define the webserver and path parameters // Main webserver: eg, <http://localhost> - should not be empty for productive servers // 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> /* * 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 */ define('HTTP_SERVER', 'http://www.kings-kreations.com'); define('HTTPS_SERVER', 'https://www.kings-kreations.com'); define('HTTP_CATALOG_SERVER', 'http://www.kings-kreations.com'); define('HTTPS_CATALOG_SERVER', 'https://www.kings-kreations.com'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'true'); define('ENABLE_SSL_ADMIN', '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_ADMIN', '/zen/admin/'); define('DIR_WS_CATALOG', '/zen/'); define('DIR_WS_HTTPS_ADMIN', 'https:///admin/'); 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) //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_ADMIN', '/home/mindy/kings-kreations-www/zen/admin/'); define('DIR_FS_CATALOG', '/home/mindy/kings-kreations-www/zen/'); 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_SERVER', 'localhost'); define('DB_SERVER_USERNAME', '**********'); define('DB_SERVER_PASSWORD', '**********'); define('DB_DATABASE', 'kings_kreations_com'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'db'); // 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', '/home/mindy/kings-kreations-www/zen/cache'); ?>