Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL enabled and using STS, but images missing


zioncomputer

Recommended Posts

Our URL is Zion Computer

 

We've just enabled SSL, but at first, it wouldn't let us view secured pages, such as the login page. We started searching this forum for answers, and even though we did find some useful information, our exact issue was either not mentioned or not resolved.

 

We installed STS (Simple Template System) over two months ago, and we were having issues with our custom images, so they wouldn't display properly in osCommerce. We found some info on that and so we changed the STS settings to use the default layout instead of the STS one. I can't remember the exact code text, but it was something like:

 

template=0
default=1
debug=0

 

After that, we had the images showing up correctly in osCommerce. We did have to do some code changing to reference our custom images, such as changing the filenames of the images from the default ones, to our's.

 

Now, after three weeks of a "supposedly working" site we recieved feedback from a friend that she cannot see the security padlock when she logs in or when she enters her information. honestly we didn't even know that much about the SSL stuff, and we assumed that everything would be already setup...wrong.

 

So this is the third day we've been hacking around at our code, and we're at a loss.

 

Our configure.php files are listed below without the usernames and passwords.

 

 

This file is "/osc/includes/configure.php"

<?php
/*
 $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 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://zioncomputer.com');
define('HTTPS_SERVER', 'https://svr67.ehostpros.com/~zionc67');
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
define('HTTP_COOKIE_DOMAIN', 'zioncomputer.com');
define('HTTPS_COOKIE_DOMAIN', 'svr67.ehostpros.com/~zionc67');
define('HTTP_COOKIE_PATH', '');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/osc/');
define('DIR_WS_HTTPS_CATALOG', '/osc/');
define('DIR_WS_IMAGES', '/osc/images/');
define('DIR_WS_ICONS', '/osc/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_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'username');
define('DB_SERVER_PASSWORD', 'password');
define('DB_DATABASE', 'database');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'mysql');

// STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
 define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');
// STS: EOADD


?>

 

This file is "/osc/admin/includes/configure.php"

<?php
/*
 $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
define('HTTP_SERVER', 'http://zioncomputer.com');
 define('HTTP_CATALOG_SERVER', 'http://zioncomputer.com');
 define('HTTPS_CATALOG_SERVER', 'https://zioncomputer.com');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
define('DIR_WS_ADMIN', '/osc/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
define('DIR_WS_CATALOG', '/osc/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_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/');

// define our database connection
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'username');
define('DB_SERVER_PASSWORD', 'password');
define('DB_DATABASE', 'database');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
 
 // STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
 define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');
// STS: EOADD

?>

 

Thank you in advance. We appreciate any help.

 

Sincerely,

Zion Computer

Link to comment
Share on other sites

Your site is looking for buttons at the following url.

 

https://svr67.ehostpros.com/~zionc67/osc/in...on_continue.gif

 

First off do you have buttons at that location? If not you need to either change where osC looks for them or put them there to be found.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Your site is looking for buttons at the following url.

 

https://svr67.ehostpros.com/~zionc67/osc/in...on_continue.gif

 

First off do you have buttons at that location? If not you need to either change where osC looks for them or put them there to be found.

 

The url that you mentioned above is the actual server address, and the path reflects our folder on the server, along with the osCommerce catalog folder.

 

I have been reading many posts regarding setting up the proper paths in the configure.php files. It seems that the website itself requires only the configure.php file in "catalog/includes", or in our case, "osc/includes", in order to work right. I'm not a coder, but it also seems that the configure.php file under "osc/admin/includes" makes the admin tool work right...but that's kind of beside the point. The reason I mentioned these files is because while reading all those posts about http and https, I found inconsistant information and I wasn't sure what applies to our website itself. I know that every website has specific differences, but generally, we're a computer company. We have a merchant account, and we really like the fact that osCommerce is free software.

 

My question is: How would we setup our configure.php files to allow us to use SSL on only the pages that require a secure connection?

 

And,

 

What are the requirements for us to be able to use SSL?

 

Basically, our webserver host provides us with SSL capabilities, and we're currently paying for it, so I'm not sure what the next step is.

Again, our host is eHostPros

 

Thank you again,

ZionComputer

Link to comment
Share on other sites

Im having the same problem. My site is secure however the browser is not displaying the lock. I have a feeling the reason the lock isnt showing up is because the page contains both secure and non-secure items.

 

I'd prefer to only use https:// on the pages that require it such as the login, account & payment rather than run the entire site thru https://.

 

Has anyone been successfully having the lock appear only on these pages?

Link to comment
Share on other sites

What are the insecure items?

 

If you click No on the PC when the browser pops up the alert you will be able to see exactly where on the page the problem lies.

 

From my experience alot of the time it's hard coded images.

 

For example an image/banner/button which you've included in your shop at http://zioncomputer.com/images/box.gif will error as an unsecure item once the https kicks in.

 

To solve this, and get your padlock back, change the link to https://svr67.ehostpros.com/~zionc67/images/box.gif

Link to comment
Share on other sites

I figured out what my problem was. My stylesheet links were set to http:// instead of https:// As soon as I changed them the lock appeared on the pages it was supposed to.

 

<link rel="stylesheet" type="text/css" href="http://...

 

to

 

<link rel="stylesheet" type="text/css" href="https://...

Link to comment
Share on other sites

Thanks for all your help.

 

We have our SSL working to the point where we do not get a browser error saying that the page has mixed content, anymore, so that's fixed.

 

Our issues are as follows:

 

1. when we are logged in and viewing a secure page (with padlock) we cannot see any images on the pages, except for the top banner graphics we made. the only reason they're showing up is because we changed the file references in the header.php file to reflect our https server address. We believe this is what allowed our site to not show the mixed content error message.

 

2. Also, when logged in and viewing a secure page, the styles of the layout are not the same as what our stylesheet has. Otherwise, on non-secure pages we can see the styles and images correctly.

 

We did install STS (Simple Template System) a while back, but have disabled it by using the 'normal=1' flag in the code. We're not sure if htis has anything to do with it.

Link to comment
Share on other sites

  • 4 months later...
I figured out what my problem was.?  My stylesheet links were set to http:// instead of https://? As soon as I changed them the lock appeared on the pages it was supposed to.

 

<link rel="stylesheet" type="text/css" href="http://...

 

to

 

<link rel="stylesheet" type="text/css" href="https://...

 

Just like to say thanks - I've been going through these posts for hours trying to sort the padlock problem, and it was the stylesheet all along! Allelujah!

Link to comment
Share on other sites

osC/includes/configure.php

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

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

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

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...