Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't get ssl working


raftini

Recommended Posts

Hi,

 

I'm going crazy!

I bought a 2 year cert from godaddy had my host install it and I just expected it to work.

Silly me, it's never that easy.

 

I was hoping to see the https:// while going through checkout, I see nothing.

Now I have to configure something and I don't know what.

 

I keep reading the solution may be in the configure.php file.

Can somone help me please.

Here's the file:

 

------------------------------------------

 

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://santaterra.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://santaterra.com'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'santaterra.com');

define('HTTPS_COOKIE_DOMAIN', 'santaterra.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

 

-------------------------------------------------

 

Thanks

Link to comment
Share on other sites

<i>define('ENABLE_SSL', false); // secure webserver for checkout procedure?</i>

 

Now that you have SSL installed, change that word FALSE to TRUE.

 

Do the same in Catalog/Admin/Includes/Configure.php

Link to comment
Share on other sites

Hi,

 

I'm going crazy!

I bought a 2 year cert from godaddy had my host install it and I just expected it to work.

Silly me, it's never that easy.

 

I was hoping to see the https:// while going through checkout, I see nothing.

Now I have to configure something and I don't know what.

 

I keep reading the solution may be in the configure.php file.

Can somone help me please.

Here's the file:

 

------------------------------------------

 

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://santaterra.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://santaterra.com'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'santaterra.com');

define('HTTPS_COOKIE_DOMAIN', 'santaterra.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

 

-------------------------------------------------

 

Thanks

Hi, you said you bought it, now do you remember the Common Name (CN) in your CSR, it is the FQDN fully qualified domain name that you use. is it "santaterra.com" or is it "www.santaterra.com" or is it "secured.santaterra.com" ??

 

SEE THE CHANGES BELOW

 

in these lines:

 

define('HTTP_SERVER', 'http://www.santaterra.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'http://www.santaterra.com''); // eg, https://localhost - should not be empty for productive servers

 

and here

 

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

define('HTTP_COOKIE_DOMAIN', 'santaterra.com');

define('HTTPS_COOKIE_DOMAIN', 'www.santaterra.com');

 

THESE CHANGES THAT I HAVE MADE AS A SAMPLE WILL WORK IF THE FULLY QUALIFIED DOMAIN NAME USE USE WHEN YOU BOUGHT THE SSL IS WWW.SANTERA.COM

 

good luck, let us know what happen. :thumbsup:

Link to comment
Share on other sites

I tried that, but it did not work, thanks.

 

My question is how does the ssl know when it should start working.

For example , I want it to kick in when they enter the order_info page and then every step during checkout after that.

I read that the button or link used to go to order_info should be like <a href="https://www.santaterra.com/order_info.php"> , but how do I do this to a button link that looks like this.

-------------------------------------------------

<?php echo '<a href="' . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'

 

 

Almost giving up. I dont get this stuff,

 

thanks

 

-mike

Link to comment
Share on other sites

Okay, this one is not too difficult.

 

Your certificate has the domain www.santaterra.com but your using just santaterra.com.

 

Change this line:

 

define('HTTPS_SERVER', 'https://santaterra.com'); // eg, https://localhost - should not be empty for productive servers

 

to

 

define('HTTPS_SERVER', 'https://www.santaterra.com'); // eg, https://localhost - should not be empty for productive servers

 

Now, that will have gotten rid of the invalid certificate warning when people visit your site.

 

On to the next bit :)

 

Look at the link you posted below

 

<?php echo '<a href="' . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'

 

See the bit that says (FILENAME_ORDER_INFO, '', 'SSL'). What that is doing is redirecting to the product_info page using the HTTPS (i.e. the SSL in that link is telling the site to enable your encryption).

 

If the URL contained this

 

(FILENAME_ORDER_INFO, '', 'NONSSL')

 

Then the page would open without encryption.

 

OsCommerce is already set up so that pages that require the SSL encryption will use it and those that dont, will remain without the https. That is so your site runs faster because the encryption process will slow everything down.

 

Just for reference.. check this link

 

https://www.santaterra.com/

 

You can see that your SSL is working. Its just a case of getting your config files correct and maybe changing a few lines to include the SSL command in the URL.

 

Your site is not currently activating the SSL pages though, so I would double check that you have changed the false to true.

 

Cheers

 

Steve

My Toolbox: Crimson Editor, Adobe Photoshop CS2.0, Expression Web, Macromedia Suite 8.0, Cinema 4D, Nvu.

Link to comment
Share on other sites

One more thing about this line. I'll explain how you would use this.

 

<?php echo '<a href="' . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL'). '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?>

 

Let me break this down into the relevant bits.

 

The first bit is stating that its php code. Php code is contained within the <? and ?>. The <a href you already know about which is the anchor link to a hyperlink reference (i.e. a URL hyperlink).

 

The bit in brackets.. . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL').

 

The "tep_href_link" is a function being called to create the hyperlink. FILENAME_ORDER_INFO is being called from the filenames.php file in your includes folder. This is just a variable that holds the name of the file to be linked to. The SSL tells the browser to open this as https.

 

tep_image_button is another function for calling an image that will be used as a link. button_checkout.gif is the filename of the image which is located in your includes/languages/images/buttons directory.

 

IMAGE_BUTTON_CHECKOUT is the variable which holds the alternative name (i.e. the alt="" bit in HTML).

 

Now, to use that is easy

 

If you have a table created and want that placed somewhere in the table, you do this

 

<table>

<tr>

<td class="your_class" align="center" width="100%"><?php echo '<a href="' . tep_href_link(FILENAME_ORDER_INFO, '', 'SSL'). '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td>

</tr>

</table>

 

Hope that helps.

 

Steve

My Toolbox: Crimson Editor, Adobe Photoshop CS2.0, Expression Web, Macromedia Suite 8.0, Cinema 4D, Nvu.

Link to comment
Share on other sites

Yes, I have a few problems to deal with, one is the cert domain mismatch.

www.santaterra is on the cert.

 

 

OK here's my configure.php file: but I still get mismatch error

Does this look right?

-----------------------------

 

define('HTTP_SERVER', 'http://santaterra.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.santaterra.com'); // eg, https://localhost - should not be empty for productive servers

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

define('HTTP_COOKIE_DOMAIN', 'santaterra.com');

define('HTTPS_COOKIE_DOMAIN', 'www.santaterra.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

define('DIR_FS_CATALOG', '/home/santater/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

------------------------------------

 

Thanks for all your help PD_Steve, kenshin and puggybelle.

Anyone else care to figure this out?

Link to comment
Share on other sites

define('HTTP_SERVER', 'http://www.santaterra.com');

define('HTTPS_SERVER', 'https://www.santaterra.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.santaterra.com');

define('HTTPS_COOKIE_DOMAIN', 'www.santaterra.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

define('DIR_FS_CATALOG', '/home/santater/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...