Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


jpweber

Recommended Posts

Hi

 

My certificate is registered to domain name without the "www." prefix.

 

so that means This is correct

 

define('HTTPS_SERVER', 'https://my-domain.co.uk');

but I tried both options!

 

When I set-up

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

The website is appearing without any images. When I checked in properties of website there are my images from template and they are with "http://" at the beginning. All of them are from my stylesheet.css. My media (flash banners) on the website are working correctly and appearing.

 

When I set-up

$request_type = (getenv('SERVER_PORT') == '443') ? 'SSL' : 'NONSSL'

The website is appearing with all images but:

 

- Mozilla 3 is telling me "You have requested an encrypted page that contains some unencrypted information. Information that you see or enter on this page could easily be read by a third party." and the padlock is with red exclamation mark.

 

- Mozilla 2 is asking to accept that certificate

 

- IE 7 is asking "Do you want to display unsecured items?"

Link to comment
Share on other sites

  • Replies 485
  • Created
  • Last Reply
My certificate is registered to domain name without the "www." prefix

You may THINK it is but that's NOT the case.

 

I'll cook up something else for you to try later.

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

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

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

 

SSL Implementation Help

 

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

Link to comment
Share on other sites

I have sorted out that problem. My settings are:

 

application.php

$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

 

configuration.php

define('HTTP_SERVER', 'http://www.my-domain.co.uk');
 define('HTTPS_SERVER', 'https://my-domain.co.uk');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'my-domain.co.uk');
 define('HTTPS_COOKIE_DOMAIN', 'my-domain.co.uk');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');

 

and the problem was there:

 

.htaccess I have deleted that

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?my-domain\.co.uk/ [NC]
RewriteRule \.(gif|jpg|png)$ - [F]

 

now everything is working.

Thanks for your time

Link to comment
Share on other sites

  • 3 weeks later...

I'm getting a Error Code: -12263

 

includes/configure.php

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

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

define('ENABLE_SSL', true);

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

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

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

admin/includes/configure.php

define('HTTP_SERVER', 'https://domain.com');

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

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

define('ENABLE_SSL_CATALOG', 'true');

 

 

I set up the SSL key and certificate through my hosting, purchased the SSL through RapidSSL and installed the certificate key with no problems.

 

If anyone can please help. If you need the actual domain let me know.

 

Thanks,

Eddie

Link to comment
Share on other sites

Ok I found out I installed it wrong, I was suppose to do it through my WHM not the Cpanel.

 

But now I am getting a 500 Internal Server Error.

 

Any help?

Link to comment
Share on other sites

Hi guys I have just installed my ssl on my site and I am trying to get it to with my osc but it doesn't seem to be working. I keep getting the error

 

An error occurred during a connection to www.mywebsite.com.au.

 

SSL received a record that exceeded the maximum permissible length.

 

(Error code: ssl_error_rx_record_too_long)

 

I have read through this topic and try what other people have said but I still cannot get it to work. Thanks in advance for your help.

 

This is my includes/configure.php

 

<?php

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

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

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'mywebsite.com.au');

define('HTTPS_COOKIE_DOMAIN', 'mywebsite.com.au');

define('HTTP_COOKIE_PATH', '/os/');

define('HTTPS_COOKIE_PATH', '/os/');

define('DIR_WS_HTTP_CATALOG', '/os/');

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

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

 

 

 

This is my admin/includes/configure.php

 

<?php

define('HTTP_SERVER', 'https://www.mywebsite.com.au');

define('HTTP_CATALOG_SERVER', 'https://www.mywebsite.com.au');

define('HTTPS_CATALOG_SERVER', 'https://www.mywebsite.com.au');

define('ENABLE_SSL_CATALOG', true);

define('DIR_FS_DOCUMENT_ROOT', '/home/mywebsite/public_html/os/');

define('DIR_WS_ADMIN', '/os/admin/');

define('DIR_FS_ADMIN', '/home/mywebsite/public_html/os/admin/');

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

define('DIR_FS_CATALOG', '/home/mywebsite/public_html/os/');

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

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

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

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', DIR_WS_CATALOG . 'includes/languages/');

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_BACKUP', DIR_FS_ADMIN . 'backups/');

Link to comment
Share on other sites

* Confirms that you are who you say you are in a virtual world.

* Encrypts information sent to and from your web server.

* Protects information from being tampered with.

* The domain for which the certificate was issued. This allows customers to check that the certificate was issued for your domain (URL).

* The legal owner of the certificate. This acts as further reassurance, since customers are able to see whom they are doing business with.

* The physical location of the owner. Once again this reassures customers that they are dealing with an actual entity.

* The validity dates of the certificate. This is extremely important, since it shows users that your SSL Web Server certificate is current.

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

althea

Link to comment
Share on other sites

  • 3 weeks later...

Anyone get the "There is a problem with this website's security certificate." message after installing an SSL certificate? I do and was hoping someone could help. I get that message when I go to any section of my oscommerce store that is supposed to be now protected by SSL (such as 'my account'). Anyone? Please?

Link to comment
Share on other sites

  • 3 weeks later...

I think I busted my site after installing SSL& trying to move everything to root. I can access my admin side, but it says I am NOT protected by SSL, & on my catalog side it says "Unable to connect to datbase server!"

 

My site is here.

 

Here is my catalog/includes/configure.php file:

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

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

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

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

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

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

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '*********');

define('DB_SERVER_PASSWORD', '*********');

define('DB_DATABASE', 'catalog');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

...and here is my catalog/admin/includes/configure.php file:

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

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

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

define('HTTP_CATALOG_SERVER', 'https://www.betweenthesticks.com/catalog');

define('HTTPS_CATALOG_SERVER', 'https://www.betweenthesticks.com');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/Library/WebServer/Documents/catalog/'); // where the pages are located on the server

define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

define('DIR_FS_ADMIN', '/Library/WebServer/Documents/catalog/admin/'); // absolute pate required

define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

define('DIR_FS_CATALOG', '/Library/WebServer/Documents/catalog/'); // absolute path required

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

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

define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

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', DIR_WS_CATALOG . 'includes/languages/');

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_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '**********');

define('DB_SERVER_PASSWORD', '**********');

define('DB_DATABASE', 'catalog');

define('USE_PCONNECT', 'false'); // use persisstent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

Can someone please tell me how to fix this? I deleted all my files out of root that I had originally copied from the catalog folder, but still no joy.

Link to comment
Share on other sites

Hello,

 

I have just purchased an SSL certificate from Register.com. They installed it and created a directory called 'secure' for my SSL pages. My site up till now has been entirely in the root of 'public'. OK, HTTP now points to 'public', and HTTPS now points to 'secure'. I had to copy my entire site to 'secure' to get SSL to work. My question is, with all the linking and redirecting built in to an OSC site, how do I know exactly what files to leave in 'public' and what files to move to 'secure'? The site works perfectly right now, but I do not want to have update files in both locations every time I make a small code change. Help, direction and thoughts would be most appreciated...

 

Thanks,

Dave

Link to comment
Share on other sites

  • 3 weeks later...

Can Anyone help me please?

 

i am really confused.

 

i use a shared SSL (because my ISP says i have to without paying for dedicated server (fasthosts))

 

so i set up my config files as such:

 

Includes/Configure.php

define('HTTP_SERVER', 'http://www.dmcgaming.co.uk');
define('HTTPS_SERVER', 'https://vault1.secured-url.com/dmcgaming');
define('ENABLE_SSL', true);
define('HTTP_COOKIE_DOMAIN', 'www.dmcgaming.co.uk');
define('HTTPS_COOKIE_DOMAIN', 'www.dmcgaming.co.uk');

 

and Admin/Includes/configure.php

  define('HTTP_SERVER', 'https://vault1.secured-url.com/dmcgaming/');
 define('HTTP_CATALOG_SERVER', 'https://vault1.secured-url.com/dmcgaming/');
 define('HTTPS_CATALOG_SERVER', 'https://vault1.secured-url.com/dmcgaming/');
 define('ENABLE_SSL_CATALOG', 'true');

this is the really confusing part.

 

everything is duplicated on the "secure" domain (by duplicated i mean i uploaded every file to it)

 

both installations go direct into the root folder (there is no catalog folder)

 

However, the secure part works perfectly on the Admin side

but on the account side it come up with the folling error:

Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in E:\sslroot\dmcgaming\includes\application_top.php on line 28

 

Fatal error: require() [function.require]: Failed opening required 'includes/configure.php' (include_path='.;C:\php\pear') in E:\sslroot\dmcgaming\includes\application_top.php on line 28

i know it exists as i can see the file in ftp?

 

can anyone assist me into why the backend (admin) HTTPS works, but not the account or store section?

 

i have tried to access the index.php file directly on the secure server but same error arises?

 

Help please!!!!!

 

many thanks in advance

 

YT

AKA Keith

there are 10 types of people who understand binary

 

those that do, and those that don't

Link to comment
Share on other sites

I have been banging my head trying to figure out why, when someone returns from Google Checkout, they are logged out. I've been wondering if it's my shared SSL.

 

I logged in...I see the https://. I go to my shopping cart to checkout. The shopping cart is http://. I hit the GCO button and go to Google. The Google site is secure. After completing the order there, you click the link to return to my site (arriving at checkout_success) and you are logged out (and it's http://). The code on the checkout_success page redirects you to the shopping cart if you are not logged in. The shopping cart is empty of course (because you are now a guest).

 

I found a note I had made when I went through setting up the shared SSL over the phone with my host...they told me to move the OSC files to the newly created 'secure' folder. I had never done that. Today I copied my products/catalog/ files to that folder. It didn't solve my problem. Is there something I need to do in my configure files? Here they are:

 

catalog/includes

 

define('HTTP_SERVER', 'http://www.itsokaytoshowoff.com');
 define('HTTPS_SERVER', 'https://secure2.securewebexchange.com/itsokaytoshowoff.com');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'itsokaytoshowoff.com');
 define('HTTPS_COOKIE_DOMAIN', 'secure2.securewebexchange.com/itsokaytoshowoff.com');
 define('HTTP_COOKIE_PATH', '/products/catalog/');
 define('HTTPS_COOKIE_PATH', '/products/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/products/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/products/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');
 //define('DIR_FS_CATALOG', '/services/webpages/i/t/itsokaytoshowoff.com/public/products/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

catalog/admin/includes

 

define('HTTP_SERVER', 'https://www.itsokaytoshowoff.com');
 define('HTTP_CATALOG_SERVER', 'https://www.itsokaytoshowoff.com');
 define('HTTPS_CATALOG_SERVER', 'https://secure2.securewebexchange.com/itsokaytoshowoff.com');
 define('ENABLE_SSL_CATALOG', 'true');
 define('DIR_FS_DOCUMENT_ROOT', '/services/webpages/i/t/itsokaytoshowoff.com/public/products/catalog/');
 define('DIR_WS_ADMIN', '/products/catalog/admin/');
 define('DIR_FS_ADMIN', '/services/webpages/i/t/itsokaytoshowoff.com/public/products/catalog/admin/');
 define('DIR_WS_CATALOG', '/products/catalog/');
 define('DIR_FS_CATALOG', '/services/webpages/i/t/itsokaytoshowoff.com/public/products/catalog/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 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', DIR_WS_CATALOG . 'includes/languages/');
 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_BACKUP', DIR_FS_ADMIN . 'backups/');

 

Does 'public' need to be replaced by 'secure' somewhere?

 

I would seriously appreciate any suggestions here...this whole GCO thing is keeping me from opening my store. GCO is the only payment type I offer.

Link to comment
Share on other sites

Wow there has been some learning curve on this thread - I wonder if i could have a turn and a little bit of some expert time please.

 

I have a shop which i have bought a ssl cert and it has been installed at www.gingerbay.co.uk

 

the editing i have done so far (all gleaned from this thread) has meant i have https:// throughout all my admin pages - except for the opening one (the big blue box) which says i am not secured. I can live with this, my main issue is i havent been able to get the https on my data collection pages of my shop.

 

I have followed all the suggestions and below are my configure.php file areas that i believe are relevant. if anyone would like anything else please ask - i have been on it for 5 hours so far !!

 

many thanks for looking.

Richard

 

from CATALOG/ADMIN/INCLUDES/

 

define('HTTP_SERVER', 'https://www.gingerbay.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTP_CATALOG_SERVER', 'https://www.gingerbay.co.uk');

define('HTTPS_CATALOG_SERVER', 'https://www.gingerbay.co.uk');

define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

define('DIR_FS_DOCUMENT_ROOT', '/hsphere/local/home/royalnor/gingerbay.co.uk/catalog/'); // where the pages are located on the server

 

 

from CATALOG/INCLUDES/

 

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

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

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

define('HTTP_COOKIE_DOMAIN', 'http://www.gingerbay.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'https://www.gingerbay.co.uk');

define('HTTP_COOKIE_PATH', 'http://www.gingerbay.co.uk');

define('HTTPS_COOKIE_PATH', 'https://www.gingerbay.co.uk');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/');

Link to comment
Share on other sites

the editing i have done so far (all gleaned from this thread) has meant i have https:// throughout all my admin pages - except for the opening one (the big blue box) which says i am not secured.

 

UPDATE - i havent changed anything but now the admin page shows the padlock and You are protected by a 128-bit secure SSL connection.

Link to comment
Share on other sites

  • 2 months later...

I'm in an Apache/Plesk environment where there are httpdocs and httpsdocs folders; everything is in httpdocs.

 

Made the changes in both config files, got "404 not found" errors on all supposed-to-be-https pages until I changed it back, ie

 

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

define('HTTPS_SERVER', 'http://www.mydomain.com');

define('ENABLE_SSL', true);

 

in includes and

 

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

define('HTTP_CATALOG_SERVER', 'http://www.mydomain.com');

define('HTTPS_CATALOG_SERVER', 'https://www.mydomain.com');

define('ENABLE_SSL_CATALOG', 'true');

 

in admin/includes

 

Not so simple after all. Cert is installed correctly. What else is wrong?

Link to comment
Share on other sites

Hi... I have been trying to get my os commerce to work with my ssl. It works fine in my admin... If I change my http and https all to https://www..etc..it works in my catalog area too, but I don't want my entire site to be ssl....

 

Here is my /admin/includes/configure.php

<?php
 define('HTTP_SERVER', 'https://www.wayside-furniture.net');
 define('HTTP_CATALOG_SERVER', 'https://www.wayside-furniture.net');
 define('HTTPS_CATALOG_SERVER', 'https://www.wayside-furniture.net');
 define('ENABLE_SSL_CATALOG', 'true');
 define('DIR_FS_DOCUMENT_ROOT', '/data/9/1/72/158/1724158/user/1861368/htdocs/outlet/');
 define('DIR_WS_ADMIN', '/outlet/admin/');
 define('DIR_FS_ADMIN', '/data/9/1/72/158/1724158/user/1861368/htdocs/outlet/admin/');
 define('DIR_WS_CATALOG', '/outlet/');
 define('DIR_FS_CATALOG', '/data/9/1/72/158/1724158/user/1861368/htdocs/outlet/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 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', DIR_WS_CATALOG . 'includes/languages/');
 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_BACKUP', DIR_FS_ADMIN . 'backups/');

 define('DB_SERVER', '******');
 define('DB_SERVER_USERNAME', '******');
 define('DB_SERVER_PASSWORD', '*****');
 define('DB_DATABASE', 'outlet_01');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

 

Here is what my /includes/configure.php looks like:

<?php
 define('HTTP_SERVER', 'http://www.wayside-furniture.net');
 define('HTTPS_SERVER', 'https://www.wayside-furniture.net');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', '.wayside-furniture.net');
 define('HTTPS_COOKIE_DOMAIN', '.wayside-furniture.net');
 define('HTTP_COOKIE_PATH', '/outlet/');
 define('HTTPS_COOKIE_PATH', '/outlet/');
 define('DIR_WS_HTTP_CATALOG', '/outlet/');
 define('DIR_WS_HTTPS_CATALOG', '/outlet/');
 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', '/data/9/1/72/158/1724158/user/1861368/htdocs/outlet/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', '*******');
 define('DB_SERVER_USERNAME', '*******');
 define('DB_SERVER_PASSWORD', '*****');
 define('DB_DATABASE', 'outlet_01');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

Any help is greatly appreciated!!!!

 

Thanks,

Jeremy

Link to comment
Share on other sites

Jeremy's post and a few emails with my host server admin brought the required improvement:

 

1 - In Plesk (and I expect other implementations of httpdocs/httpsdocs) there is a setting that directs everything to httpdocs for simplicity. I made that setting and re-set the catalog/admin/includes/configure.php as recommended and as Jeremy has his. The result is success: everything on the admin side is now https.

 

2 - on the catalog side I made the change to /includes/configure.php that Jeremy made as well. That's also the recommended setting. Now that side comes up as http: when no user is logged in (the behavior I want), and goes to https: when I select "create account" as described earlier in this thread. All to the good. Once a user logs in--and here's the tricky bit--the main page comes back https:. BUT THEN, as I scroll around to different pages, it reverts to http and even going back to the main page (Catalog Home) is in http. Checkout is https.

 

 

So the only odd thing is that first page after login which ought to be http but is https. That confused me at first as I thought the whole catalog had gone https until I bounced around a bit.

 

I'm on RC2a.

 

In short, once I fixed the Plesk settings, I got the oscommerce behavior expected in the leading post of this thread minus that little anomaly. I can live with that.

 

Anyone who can clarify this, though, please do.

 

Al

Link to comment
Share on other sites

Hi, I followed your instructions and everything seemed to work fine. I clicked on a product and got the message "This page contains secure and non secure items, do you want to see the non secure items?" I click yes, but when it takes me to the site, it looks disorganized and all my pictures have an error, they dont show? What is wrong?

 

Thank you!

Link to comment
Share on other sites

  • 1 month later...

First I will say I am a novice so please bear with me. I am trying to get the SSL portion of my site to work. After adding something to the cart and selecting "account" or "check out" this is the error I get:

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/content/t/o/y/toydaddy/html/account.php on line 13

 

Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/local/lib/php') in /home/content/t/o/y/toydaddy/html/account.php on line 13

 

My site is www.bobakhan.com

 

Here is a copy of my account.php line 13:

 

require('includes/application_top.php');

 

Please let me know if anyone can help me or what additional info is needed to help me figure this out. Thanks in advance!

Link to comment
Share on other sites

Your site is in your-store.com/catalog folder. If you put your mouse cursor in "my account" link, it's looking at your-store.com/account.php. It's giving you that error because it's looking for the "application top" file in the root directory/folder, while the file is really inside the catalog folder.

 

1. Make changes to your configure.php file inside catalog/includes/ folder.

-OR--

2. Move the contents of your catalog folder to the root(html) folder/directory and make changes to your configure.php file if necessary.

First I will say I am a novice so please bear with me. I am trying to get the SSL portion of my site to work. After adding something to the cart and selecting "account" or "check out" this is the error I get:

 

Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /home/content/t/o/y/toydaddy/html/account.php on line 13

 

Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/local/lib/php') in /home/content/t/o/y/toydaddy/html/account.php on line 13

 

My site is www.bobakhan.com

 

Here is a copy of my account.php line 13:

 

require('includes/application_top.php');

 

Please let me know if anyone can help me or what additional info is needed to help me figure this out. Thanks in advance!

Link to comment
Share on other sites

Your site is in your-store.com/catalog folder. If you put your mouse cursor in "my account" link, it's looking at your-store.com/account.php. It's giving you that error because it's looking for the "application top" file in the root directory/folder, while the file is really inside the catalog folder.

 

1. Make changes to your configure.php file inside catalog/includes/ folder.

-OR--

2. Move the contents of your catalog folder to the root(html) folder/directory and make changes to your configure.php file if necessary.

 

Thanks for the reply!

 

I am at a loss to what needs to be updated in the configure.php file? Here is what my confiure.php has:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

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

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/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/content/t/o/y/toydaddy/html/catalog/');

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

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

Link to comment
Share on other sites

Copy or move ALL the CONTENTS of your catalog folder to root(html) AND

make these changes to your configure.php files

 

/includes/ configure.php file

 

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home/content/t/o/y/toydaddy/html/');

 

You also need to make changes to your admin/includes configure.php file.

It's up to you if you want to enbale SSL in your admin directory or not.

 

admin/includes - configure.php (no ssl)

 

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

define('HTTP_CATALOG_SERVER', 'http://www.bobakhan.com');

define('HTTPS_CATALOG_SERVER', 'http//www.bobakhan.com');

define('ENABLE_SSL_CATALOG', 'false');

define('DIR_FS_DOCUMENT_ROOT', '/home/content/t/o/y/toydaddy/html/');

define('DIR_WS_ADMIN', '/admin/');

define('DIR_FS_ADMIN', '/home/content/t/o/y/toydaddy/html/admin/');

define('DIR_WS_CATALOG', '/');

define('DIR_FS_CATALOG', '/home/content/t/o/y/toydaddy/html/');

 

If you want to enable SSL in admin, do the following to admin/includes configure.php:

1. change all http to -> https and

2. enable ssl to TRUE

 

Thanks for the reply!

 

I am at a loss to what needs to be updated in the configure.php file? Here is what my confiure.php has:

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

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

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

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

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

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

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

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/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/content/t/o/y/toydaddy/html/catalog/');

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

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

Link to comment
Share on other sites

  • 2 weeks later...

Hi! I have installed our hosting company's general SSL certificate to the site.

 

I have been able to get the cart to show https:// and the lock on pages with secure information.

 

However, I have a couple problems:

1) The admin site still shows "You are not protected by a secure SSL connection" on the front page.

 

And an even bigger problem... none of my modules are functioning or showing in the checkout process. (Payment, shipping, and order total.)

 

Customers go all the way through the checkout process without ever being prompted to select shipping type, input credit card information, or receive an order total.

 

Please help!

Link to comment
Share on other sites

Hello, I just recently got my ssl. I followed the steps in the first post. But then I get this message

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'centtaco'@'72.167.232.232' (using password: YES) in /home/content/c/e/n/centtaco/html/includes/functions/database.php on line 19

Unable to connect to database server!

 

Am I forgetting something? Please help.

 

this is what i changed

 

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

define('HTTPS_SERVER', 'http://www.99centtaco.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', '99centtaco.com');

define('HTTPS_COOKIE_DOMAIN', '99centtaco.com');

 

 

define('HTTPS_SERVER', 'http://www.99centtaco.com');

define('HTTPS_CATALOG_SERVER', 'http://www.99centtaco.com');

define('HTTPS_CATALOG_SERVER', 'http://www.99centtaco.com');

define('ENABLE_SSL_CATALOG', 'true');

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...