Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 12 votes

How to install SSL on OSC: A Simple 1-2-3 Instruction


  • You cannot reply to this topic
475 replies to this topic

#461 cdemo

  • Community Member
  • 17 posts
  • Real Name:Cathy

Posted 08 May 2011, 16:05

View Postgerm, on 08 May 2011, 11:40, said:

The cookie settings in the config file are probably wrong.


I should mention I'm a newbee. I can follow instructions but I don't know what's right or wrong to look at it. Could you give me more details? Which config php? What should it look like?

Thanks
cdemo

#462 cdemo

  • Community Member
  • 17 posts
  • Real Name:Cathy

Posted 08 May 2011, 16:13

.

Edited by cdemo, 08 May 2011, 16:15.


#463 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 08 May 2011, 18:16

/catalog/includes/configure.php

If you're talking about your "scrap" site things seemed to work for me.

I made an account and put something in the cart and started the checkout process.

Of course I had to manually change the URL to be https, but things stayed in the cart and I was never logged off going back and forth from http to https and in/out of the checkout process.

I tried with IE7 and FF3.0 and it all worked flawlessly for me.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#464 cdemo

  • Community Member
  • 17 posts
  • Real Name:Cathy

Posted 08 May 2011, 18:26

View Postgerm, on 08 May 2011, 18:16, said:

/catalog/includes/configure.php

If you're talking about your "scrap" site things seemed to work for me.

I made an account and put something in the cart and started the checkout process.

Of course I had to manually change the URL to be https, but things stayed in the cart and I was never logged off going back and forth from http to https and in/out of the checkout process.

I tried with IE7 and FF3.0 and it all worked flawlessly for me.

I have changed the code from false to true. Could you give it a try now and see what happens?
Thanks

#465 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 08 May 2011, 18:34

It dumps the cart now.

It looks like the config file is setup for shared SSL, but the site works for dedicated SSL as well.

Did you recently install a dedicated SSL cert?
:unsure:
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#466 cdemo

  • Community Member
  • 17 posts
  • Real Name:Cathy

Posted 08 May 2011, 18:39

View Postgerm, on 08 May 2011, 18:34, said:

It dumps the cart now.

It looks like the config file is setup for shared SSL, but the site works for dedicated SSL as well.

Did you recently install a dedicated SSL cert?
:unsure:

A certificate was installed some time ago by my host but I only just found out about making these changes so that the "s" shows up in the address and I wanted to place the badge on the site. It's through Geotrust.
Can you advise me what I need to do?

#467 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 08 May 2011, 18:55

If you switched from shared SSL to dedicated SSL you need to look at and maybe change 3 lines in your /catalog/includes/configure.php file.




Take the text from this line:

  define('HTTP_COOKIE_DOMAIN', 'TAKE_WHAT_YOU_HAVE_HERE');
And put it the same text on this line:

  define('HTTPS_COOKIE_DOMAIN', 'PUT_THAT SAME_TEXT_HERE');




Take the text from this line:

  define('HTTP_COOKIE_PATH', 'TAKE_THIS_TEXT');
Put that same text on this line:

  define('HTTPS_COOKIE_PATH', 'COPY_THAT_SAME_TEXT_HERE');




Take the text from this line:

  define('DIR_WS_HTTP_CATALOG', 'WHATEVER_TEXT_IS_HERE');

And copy it here

  define('DIR_WS_HTTPS_CATALOG', 'COPY_THAT_TEXT_HERE');




If you aren't sure you can PM me these 6 lines in the config file and I'll change them and PM it back to you.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#468 cdemo

  • Community Member
  • 17 posts
  • Real Name:Cathy

Posted 08 May 2011, 19:05

View Postgerm, on 08 May 2011, 18:55, said:

If you switched from shared SSL to dedicated SSL you need to look at and maybe change 3 lines in your /catalog/includes/configure.php file.




Take the text from this line:

  define('HTTP_COOKIE_DOMAIN', 'TAKE_WHAT_YOU_HAVE_HERE');
And put it the same text on this line:

  define('HTTPS_COOKIE_DOMAIN', 'PUT_THAT SAME_TEXT_HERE');




Take the text from this line:

  define('HTTP_COOKIE_PATH', 'TAKE_THIS_TEXT');
Put that same text on this line:

  define('HTTPS_COOKIE_PATH', 'COPY_THAT_SAME_TEXT_HERE');




Take the text from this line:

  define('DIR_WS_HTTP_CATALOG', 'WHATEVER_TEXT_IS_HERE');

And copy it here

  define('DIR_WS_HTTPS_CATALOG', 'COPY_THAT_TEXT_HERE');




If you aren't sure you can PM me these 6 lines in the config file and I'll change them and PM it back to you.

Thanks germ. I'll be back to try this out in a few hours.
cdemo

#469 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 08 May 2011, 20:08

And I forgot one...
:blush:

Take the text from here:

  define('HTTP_SERVER', 'http://THIS_TEXT_HERE');
And copy it here:

  define('HTTPS_SERVER', 'https://COPY_IT_HERE');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#470 jpweber

  • Community Member
  • 1,259 posts
  • Real Name:Jason Weber
  • Gender:Male
  • Location:Detroit, Michigan

Posted 06 December 2011, 18:01

I'm using Digicert on one of my sites now: http://www.digicert.com ...
And an apology to those of you I never had a chance to respond to, as I kinda fell off the face of the Earth for awhile there ... wasn't able to use a computer much, travelling, always on the road. But I'll be able to post more often now.
Jason

Simple 1-2-3 Intructions on how to get, install and configure SSL

The Google Sandbox explained

Simple to follow instructions on how to change the look of your OSC

How To Make A Horrible OSC Website

my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

#471 m.ather

  • Community Member
  • 14 posts

Posted 25 December 2011, 06:54

View Postjpweber, on 31 October 2006, 21:47, said:

Special note to shared SSL users, in particular bluehost users. Now I don't really recommend Shared SSL, although it's worked for many. I'd prefer the real thing. Anyway, with bluehost, your config files would look like this (note: "username" refers to the username given to you by Bluehost):

Includes/Configure.php:
define('HTTP_SERVER', 'http://www.yoursite.com');
define('HTTPS_SERVER', 'https://secure.bluehost.com/~username');
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', '.yoursite.com');
define('HTTPS_COOKIE_DOMAIN', 'secure.bluehost.com/~username');

Admin/Includes/Configure.php:
define('HTTP_SERVER', 'https://www.yoursite.com');
define('HTTP_CATALOG_SERVER', 'https://www.yoursite.com');
define('HTTPS_CATALOG_SERVER', 'https://secure.bluehost.com/~username');
define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

As is any case with Shared SSL, you'll have to contact your host for the proper configure files, but a simple google search will help, seeing as that many users using the same Shared SSL have already installed OSC beforehand, and have posted about it. So search the web, or call your host -- but if you're going through Bluehost, you already know now. Good luck!


Hi dude,
Thanks for SSL tutorial, I am surprised how clear your suggestions are from 2003. WOW.
Now i am stuck with two small things in include/configure.php file.
What will be the value of the following 2 lines as i am using public_html folder on my server to put all files. I believe it has to be absolute path required. So,
which one is correct.

1. define('DIR_WS_HTTP_CATALOG', '/');
1.1 define('DIR_WS_HTTP_CATALOG', '/public_html');
2. define('DIR_FS_CATALOG', '/');
2. define('DIR_FS_CATALOG', '/public_html');

Infact what will be the value of these lines for my project.
define('HTTP_COOKIE_PATH', '???');
define('HTTPS_COOKIE_PATH', '???');
define('DIR_WS_HTTP_CATALOG', '???');
define('DIR_WS_HTTPS_CATALOG', '???');

Secondly,
in admin/include/configure.php, what will be the value of following lines,
.
..
define('DIR_FS_DOCUMENT_ROOT', '???');
define('DIR_WS_ADMIN', 'admin/'); //its ok i guess
define('DIR_FS_ADMIN', '/admin/'); //its ok i guess
define('DIR_WS_CATALOG', '???');
define('DIR_FS_CATALOG', '???');
By the way, i am using following for my localhost. dont be confuse with project1. I will copy all inner files in project1 folder to "public_html" folder on server.
C:\server\www\myserver.dev\public_html\project1\
AND
http://localhost/project1
important: I am using shared SSL with server.hostname.com/~username
Pls help Jason.

#472 m.ather

  • Community Member
  • 14 posts

Posted 25 December 2011, 09:27

How can i send an email in case if need to??? thanks jason

#473 jpweber

  • Community Member
  • 1,259 posts
  • Real Name:Jason Weber
  • Gender:Male
  • Location:Detroit, Michigan

Posted 25 December 2011, 12:30

View Postm.ather, on 25 December 2011, 06:54, said:

Hi dude,
Thanks for SSL tutorial, I am surprised how clear your suggestions are from 2003. WOW.
Now i am stuck with two small things in include/configure.php file.
What will be the value of the following 2 lines as i am using public_html folder on my server to put all files. I believe it has to be absolute path required. So,
which one is correct.

1. define('DIR_WS_HTTP_CATALOG', '/');

1.1 define('DIR_WS_HTTP_CATALOG', '/public_html');
2. define('DIR_FS_CATALOG', '/');
2. define('DIR_FS_CATALOG', '/public_html');

Infact what will be the value of these lines for my project.
define('HTTP_COOKIE_PATH', '???');
define('HTTPS_COOKIE_PATH', '???');
define('DIR_WS_HTTP_CATALOG', '???');
define('DIR_WS_HTTPS_CATALOG', '???');

Secondly,
in admin/include/configure.php, what will be the value of following lines,

define('DIR_FS_DOCUMENT_ROOT', '???');
define('DIR_WS_ADMIN', 'admin/'); //its ok i guess
define('DIR_FS_ADMIN', '/admin/'); //its ok i guess
define('DIR_WS_CATALOG', '???');
define('DIR_FS_CATALOG', '???');
By the way, i am using following for my localhost. dont be confuse with project1. I will copy all inner files in project1 folder to "public_html" folder on server.
C:\server\www\myserver.dev\public_html\project1\
AND
http://localhost/project1
important: I am using shared SSL with server.hostname.com/~username
Pls help Jason.

Hello Mather. Let's try this:


define('HTTP_SERVER', 'http://www.domain.com'); // eg, http://localhost - should not be empty for productive servers
define('HTTPS_SERVER', 'https://secure.bluehost.com/~username'); // eg, https://localhost - should not be empty for productive servers
define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'www.domain.com');
define('HTTPS_COOKIE_DOMAIN', 'secure.bluehost.com'); // leave ~username out this time

You want to make sure that the HTTP_SERVER and HTTPS_SERVER domain names are equal to the HTTP_COOKIE_DOMAIN and HTTPS_COOKIE_DOMAIN setting as well. I think things have changed slightly, and now you will notice you do not include the "https" or the "~username" or any other folders at all, just the domain name.


  define('HTTP_COOKIE_PATH', '/');
  define('HTTPS_COOKIE_PATH', '/');
  define('DIR_WS_HTTP_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

And

  define('DIR_FS_CATALOG', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // absolute path required

Admin:
  define('DIR_FS_DOCUMENT_ROOT', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // where the pages are located on the server

  define('DIR_WS_ADMIN', '/admin/'); // absolute path required
  define('DIR_FS_ADMIN', '/home/[b]YOUR FOLDER NAME[/b]/public_html/admin/'); // absolute pate required

  define('DIR_WS_CATALOG', '/[b]YOUR FOLDER NAME[/b]/'); // absolute path required
  define('DIR_FS_CATALOG', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // absolute path required



Let me know if you have any further questions. Hope this helps.
Jason

Simple 1-2-3 Intructions on how to get, install and configure SSL

The Google Sandbox explained

Simple to follow instructions on how to change the look of your OSC

How To Make A Horrible OSC Website

my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...

#474 m.ather

  • Community Member
  • 14 posts

Posted 26 December 2011, 18:32

 define('DIR_FS_CATALOG', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // absolute path required
Admin:
 define('DIR_FS_DOCUMENT_ROOT', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/[b]YOUR FOLDER NAME[/b]/public_html/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/[b]YOUR FOLDER NAME[/b]/'); // absolute path required
define('DIR_FS_CATALOG', '/home/[b]YOUR FOLDER NAME[/b]/public_html/'); // absolute path required

Let me know if you have any further questions. Hope this helps.

Thanks for your reply Jason,

1. See the "folder name" you're referring to in this field,('/home/YOUR FOLDER NAME/public_html/') has to do something with local folder on localhost or the is it webserver folder? Because when i go to server via ws_ftp,it shows few folders including "public_html". I don't understand what folder name is that. but.....i found my HOMEDIRECTORY on server i.e. 'home/eb***n1/public_html/'

Are you referring to the "eb***n1"?

2. IF YES, ..then I have changed all the fields require absolute path with '/home/eb***n1/public_html/', assuming to referring to this server folder. but now when i am trying to go to my server admin panel. by typing. www.mysitename.com/admin. I am getting this error.

404 Not Found
The server can not find the requested page:
Please forward this error screen to www.eb***.com's

2. Secondly, I am still getting message-box asking for "do you want to view only the webpage content that was delivered securely"?.
This message i am getting on "myaccount", login, and forgot_password links.
I read your previous post where you have suggested that there should be some links without S, along http? but i can't find it.
Do i have to find each .php file, like "myaccount", "login", and "forgot_password" to add "S" with "http", OR is it something to do with index.php?

Thanks so much for your reply. Happy Christmas and New year!! if you celebrate. [img]http://forums.oscommerce.com//public/style_emoticons/default/smile.png[/img]

Edited by m.ather, 26 December 2011, 18:37.


#475 germ

  • Community Member
  • 13,581 posts
  • Real Name:Jim
  • Gender:Male
  • Location:USA (GMT-6)

Posted 26 December 2011, 18:46

You might check out the "SSL Implementation Help" link in my signature.

If you are getting the "Do you want to view only the webpage content that was delivered securely" message it might be because the store isn't recognizing that SSL is "on". This happens quite often with shared SSL. Or there might be "unsecure content" (scripts, images, or iframes from http sources) on the page. I can't say without looking myself.

In the thread I am referring to there are things to check and try (in the first post).

In the second post of the thread a link to a contribution I wrote to help identify and fix SSL problems. Although the reults of the output usually need interpretation. The code wasn't designed as a "Here is the problem..." type solution.
If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

"Headers already sent" - The definitive help

"Cannot redeclare ..." - How to find/fix it

SSL Implementation Help

Like this post? "Like" it again over there >

#476 jpweber

  • Community Member
  • 1,259 posts
  • Real Name:Jason Weber
  • Gender:Male
  • Location:Detroit, Michigan

Posted 27 December 2011, 04:27

Yes, your webserver, which is the eb-n1 thing. Ask your web hosting company for the path if you're still unsure, but that's probably it. It's probably something very similar to your company name or domain, so go with the eb-n1.

But the ONLY thing that should be httpS in your catalog/ADMIN/includes/configure.php folder is the following line:

define('HTTP_CATALOG_SERVER', 'https://www.domain.com');
define('HTTPS_CATALOG_SERVER', 'httpS://www.domain.com');

Nothing else with your shared SSL.

I mean, you can try adding these lines to your admin/includes/configure.php file:
define('DIR_WS_ADMIN', '/catalog/admin/');
define('DIR_FS_ADMIN', '/fullpath/to/yourserver/catalog/admin/');
Shared SSLs are strange, and very different based on your host. They should offer full support in helping you get this up and running.

Also, try adjusting your browser's settings. For instance, I think IE goes something like:

tools>internet options>security>custom level>display mixed content: enable



After that, don't forget about the http://forums.oscommerce.com/topic/334107-ssl-implementation-help/ link -- specifically, the first two posts by Jim.
Jason

Simple 1-2-3 Intructions on how to get, install and configure SSL

The Google Sandbox explained

Simple to follow instructions on how to change the look of your OSC

How To Make A Horrible OSC Website

my toolbox: PHP Designer 2007 - Winmerge - phpMyAdmin - WS_FTP - Photoshop - Paint Shop Pro - Crimson Editor

my installed contributions: Category Banners, File Upload feature-.77, Header Tags, Sort_Product_Attributes_1, XSellv2.3, Price Break 1.11.2, wishlist 3.5, rollover_category_images_v1.2, Short_Description_v2.1, UPSXML_v1_2_3, quickbooks qbi_v2_10, allprods v4.4, Mouseover-effect for image-buttons 1.0, Ultimate_SEO, AAP 1.41, Auto Select State Value, Fast Easy Checkout, Dynamic SiteMap v2.0, Image Magic, Links Manager 1.14, Featured Products, Customer Testimonials, Article Manager, FAQ System, and I'm sure more ...