Community Add-Ons

Add file to this package
Top » Other

1and1 SSL Fix
for osCommerce Online Merchant v2.2

1AND1 SSL FIX

Due to the many problems people have had (including myself) with using a dedicated or shared SSL with 1AND1 internet hosting I have decided to add it as a contribution to help people to easily find it. This includes the 'necessary' changes needed to get your SSL working properly when hosted by this popular hosting company. I have included the changes that need to be made when either using a shared SSL or a dedicated SSL which are both different. In addition to this I have also included the instructions on how to code your html or using the WYSIWYG HTML Editor when inserting images so that they are changed to the https when in secure mode. The download includes the same text below so theirs no need to download it. Credit goes to the original persons who mentioned these fixes in the forum. I've just compiled them and told you which ones to use for which (and added relative address code) as it was not clear in the forum which ones actually worked and for which type of SSL it would or would not work with.

BACKUP YOUR FILES FIRST!!!

DEDICATED SSL WITH 1AND1 HOSTING
*************************************************
1. Change:
(getenv('HTTPS') == 'on')
to
(getenv('HTTPS') == '1')
in
includes/application_top.php
includes/functions/general.php
admin/index.php

2. The correct relative address html code for images using the dedicated ssl would be for example src="/images/logo_background_default.gif" with the '/' in the front.This is for either using your own html pages in the site or using the ever popular WYSIWYG HTML Editor which does not normally format the code in this way. Therefor you will need to manually change it.


SHARED SSL WITH 1AND1 HOSTING
*********************************************
1. Add below:
$request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';
this
$request_type = (eregi ($HTTP_HOST, HTTPS_SERVER)) ? 'SSL' : 'NONSSL';
in
includes/application_top.php

2. The correct relative address html code for images using the dedicated ssl would be for example src="images/logo_background_default.gif" WITHOUT the '/' in the front. This is for either using your own html pages in the site or using the ever popular WYSIWYG HTML Editor which does not normally format the code in this way. Therefor you will need to manually change it.

3. In includes/configure.php adjust your configuration in the following way in the example below.

define('HTTPS_SERVER', 'https://web1.secure-secure.com/yoursitename.com'); // eg, https://localhost - should not be empty for productive servers
define('HTTP_COOKIE_DOMAIN', 'www.yoursitename.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/catalog/');
define('HTTPS_COOKIE_PATH', '/catalog/');
define('DIR_WS_HTTPS_CATALOG', '/catalog/');

Legend:  Download   Report

Expand All / Collapse All

This is how it's done for 1and1 VipMaster 23 Feb 2009  

That /Install/ directory that you deleted. you need that. No sweat just download it and unpack it on your pc ( hint: rename the directory to installer or something so your cart doesn't complain )

Now goto your ftp make a directory under admin called backups.

log into the admin panel and select to backup your database to the server.

visit http://domain.com/install (/installer, or what ever you named it)

put in your DB access stuff and then when it asks for your site address add the (s) to http://

Much faster and easier then editing a bunch of files and it actually works.

I couldn't get it to work otherwise..

By the way. If you mess it up don't cry to me.

If you are not 100% confident that you (meaning 100% confident) can follow these steps, First use ftp and make a complete backup of your site including the Data Base..

But really thats what I did and my site is 100% https:// all the way. The product isn't ready for launch so I won't give you the URL quite yet. maybe later.

Real Solution for 1and1 AlanR 13 Oct 2005  
1and1 SSL Fix tthom77@yahoo.com 22 Jun 2005