Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL works on index.php but nowhere else!


BigJim77

Recommended Posts

Hello people,

 

I've been following some of the posts here for a while and i've managed to sort out many issues with support from these forums.

 

I'm hoping that someone can help me with an SSL problem I'm having. I've done some searching through the support forums but I can't find a solution to my problem.

 

My ISP is 1and1.co.uk and for the time being I'm using their Shared SSL Encryption. I made all the nesassary changes to my configure.php and I also changed this bit of code in application_top.php:

 

// set the type of request (secure or not)

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

$request_type = (eregi ($HTTP_HOST , HTTPS_SERVER)) ? 'SSL' : 'NONSSL';

 

 

The problem is the SSL is working around the main site and on the index.php page. But as soon as I browse to anywhere else in the shop the padlock dissappears. Anyone know how I can sort this?

 

Oh one more thing, is it worth spending the ?3.99 a month for the dedicated SSL or is the shared version suffitient? Could this be part of the reason why the SSL isn't working right across my site?

 

Thanks for your help.

 

PS: here's my configure.php code:

 

<?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.cliftonoffice.co.uk'); // eg, http://localhost - should not be empty for productive servers

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

define('HTTPS_COOKIE_DOMAIN', 'https://sslrelay.com/cliftonoffice.co.uk');

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

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

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

define('DIR_WS_HTTPS_CATALOG', '/osc/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', '/kunden/homepages/39/d86742487/htdocs/osc/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', 'db350.oneandone.co.uk'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'dbo132758286');

define('DB_SERVER_PASSWORD', 'RFArt5pX');

define('DB_DATABASE', 'db132758286');

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

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

?>

Link to comment
Share on other sites

many discussions about 1and1 for them not working properly with ssl.

you will now need to change your database username and password as you have them posted here. if you ever post your configure.php files in the future, never ever post the database connection info.

so before you do anything else after this sentence GO CHANGE YOUR DB USERNAME AND PASSWORD.

then come back and search for 1and1

Link to comment
Share on other sites

Instead of:

 

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

$request_type = (eregi ($HTTP_HOST , HTTPS_SERVER)) ? 'SSL' : 'NONSSL';

 

 

Try:

 

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

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

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)

Link to comment
Share on other sites

Thanks I figured it out now anyway.

 

Yeah I noticed about the username and password about 5 minutes after posting but I couldn't edit my post. I've changed the login details since then so I should be safe!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...