Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Uses sslrelay.com unnecessarily (for images etc.)


fishface

Recommended Posts

Posted

Hi all,

 

First off -- sorry if this has already been answered previously; I'm sure it must have been but after 2? hours of scouring Google and experimenting I'm hitting blanks.

 

I've got OSCommerce milestone 2 installed on a 1and1.co.uk Professional account and I've managed to get the SSL working so that the padlock appears at the checkout stage. I'm using a shared SSL certificate that 1and1 provide through sslrelay.com.

 

The problem I'm having is that the site is loading all of the images through sslrelay.com which slows down each page appearing. I only really want OSCommerce to start using SSL when it comes to checkout time.

 

As far as I'm aware I've turned off the SSL catalog option:

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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.plaintalksigns.co.uk'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.plaintalksigns.co.uk');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', '/kunden/homepages/43/d112210616/htdocs/plaintalksigns/public_html/'); // where the pages are located on the server
 define('DIR_WS_ADMIN', '/admin/'); // absolute path required
 define('DIR_FS_ADMIN', '/kunden/homepages/43/d112210616/htdocs/plaintalksigns/public_html/admin/'); // absolute pate required
 define('DIR_WS_CATALOG', '/'); // absolute path required
 define('DIR_FS_CATALOG', '/kunden/homepages/43/d112210616/htdocs/plaintalksigns/public_html/'); // 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/');

 

Because I've not even included 'HTTPS_CATALOG_SERVER' I can't see where OSCommerce is managing to get the https://sslrelay.com/plaintalksigns... from. Just in case it helps here is my other configure.php:

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 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.plaintalksigns.co.uk'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://sslrelay.com'); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.plaintalksigns.co.uk');
 define('HTTPS_COOKIE_DOMAIN', 'sslrelay.com/plaintalksigns.co.uk');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/plaintalksigns.co.uk/');
 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', '/kunden/homepages/43/d112210616/htdocs/plaintalksigns/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

Incidentally, the site at the moment shows broken images which I know how to fix -- it's this sslrelay business that's causing me the problems!

 

Any help would be really, really appreciated because I've already wasted a morning trying to sort it. Thanks in anticipation.

Posted

See: http://www.oscommerce.com/forums/index.php?sho...23entry672623

 

The answer is...

 

$request_type = (getenv('HTTP_X_FORWARDED_HOST') == 'sslrelay.com') ? 'SSL' : 'NONSSL';

 

The config is...

 

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

define('HTTPS_SERVER', 'https://sslrelay.com/plaintalksigns.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', 'www.plaintalksigns.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'sslrelay.com/plaintalksigns.co.uk');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

Alan, thank you so, so much -- I've just made those two changes and tested it and the images are coming from http now, and the site is noticeably faster to load. You've literally saved me hours more scouring and countless tufts of hair dragged out in frustration. Thank you, and I hope I can reciprocate the help one day!

Archived

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

×
×
  • Create New...