Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

still having trouble with SSL


godaisy

Recommended Posts

Posted

I finally got a secure connection on the online store I'm designing...it's on a shared SSL through the web host, and uses a payment gateway from Authorize.net, if that makes any difference.

I'm not having any issues with it using a Mac with Firefox, but in IE I get a message that the SSL issuer is not a trusted source. My friend who I'm designing the site for gets a message on his Windows IE that there are secure and insecure items on the page when he goes to the login screen.

 

The only page where I have hard coded links into was the header.php file. So I went back and took out the 'http://' and changed the links to '../file.html', '../file.jpg', etc. I thought that should be an easy fix, but he's still getting the same message. I'm posting the code from my header.php file here, maybe there's an error in my code I missed somewhere? I haven't put any links or images into the other files so I'm pretty sure it's got to be a problem with header.php. Here's a link to his store also:

http://www.blueriveranglers.com/catalog

 

I really don't know PHP so it's been a major pain trying to code the interface for this store, & problems like this one are completely irritating.

 

<style type="text/css">
<!--   
a {font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
  color: #000000;	
  font-weight: bold; 
  text-decoration: none;}

a:hover {font-family: Verdana, Arial, sans-serif;
	 font-size: 11px;
	 color: #ffffff;
	 font-weight: bold;
	 text-decoration: none;}	 

#logo {position: absolute; left: 0px; top: 0px;}		
#about {position: absolute; left: 160px; top: 56px;}
#trips {position: absolute; left: 212px; top: 62px;}
#guides {position: absolute; left: 258px; top: 62px;}
#travel {position: absolute; left: 316px; top: 56px;}
#store {position: absolute; left: 377px; top: 56px;}
#photos {position: absolute; left: 431px; top: 56px;}
#conditions {position: absolute; left: 502px; top: 56px;}
#location {position: absolute; left: 583px; top: 62px;}
#contact {position: absolute; left: 650px; top: 56px;}
#links {position: absolute; left: 710px; top: 62px;}

#table {position: absolute; left: 0px; top: 110px;}
-->	   
</style>

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>

<div id="logo"><a href="../"><img src="../images/logo.jpg" width="150" height="108" align="left" border="0" alt="Home"></a></div>
<div id="about"><a href="../aboutus.html">About<br />  Us</a></div> 
<div id="trips"><a href="../trips.html">Trips</a></div>
<div id="guides"><a href="../guides.html">Guides</a></div>
<div id="travel"><a href="../travel.html">Fishing<br />Travel</a></div>
<div id="store"><a href="../catalog/index.php">Online<br /> Store</a></div>
<div id="photos"><a href="../photos.html">Photos &<br />   Flies</a></div>
<div id="conditions"><a href="../conditions.html">  Current<br />Conditions</a></div>
<div id="location"><a href="../location.html">Location</a></div>
<div id="contact"><a href="../contact.html">Contact<br />	Us</a></div>
<div id="links"><a href="../links.html">Links</a></div>

<div id="table">
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ? '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
</div>
<?php
 }
?>

Posted

All your links in the header have //conditions.html and such at the end of it and the images that do not appear when I tell IE not to show non secure items are the header background image and the taps to your other pages. To fix this insure that the images are on your server and it should go away.

 

Eric

Posted
I finally got a secure connection on the online store I'm designing...it's on a shared SSL through the web host, and uses a payment gateway from Authorize.net, if that makes any difference.

I'm not having any issues with it using a Mac with Firefox, but in IE I get a message that the SSL issuer is not a trusted source. My friend who I'm designing the site for gets a message on his Windows IE that there are secure and insecure items on the page when he goes to the login screen.

 

The only page where I have hard coded links into was the header.php file. So I went back and took out the 'http://' and changed the links to '../file.html', '../file.jpg', etc. I thought that should be an easy fix, but he's still getting the same message. I'm posting the code from my header.php file here, maybe there's an error in my code I missed somewhere? I haven't put any links or images into the other files so I'm pretty sure it's got to be a problem with header.php. Here's a link to his store also:

http://www.blueriveranglers.com/catalog

 

I really don't know PHP so it's been a major pain trying to code the interface for this store, & problems like this one are completely irritating.

 

<style type="text/css">
<!--   
a {font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
  color: #000000;	
  font-weight: bold; 
  text-decoration: none;}

a:hover {font-family: Verdana, Arial, sans-serif;
	 font-size: 11px;
	 color: #ffffff;
	 font-weight: bold;
	 text-decoration: none;}	 

#logo {position: absolute; left: 0px; top: 0px;}		
#about {position: absolute; left: 160px; top: 56px;}
#trips {position: absolute; left: 212px; top: 62px;}
#guides {position: absolute; left: 258px; top: 62px;}
#travel {position: absolute; left: 316px; top: 56px;}
#store {position: absolute; left: 377px; top: 56px;}
#photos {position: absolute; left: 431px; top: 56px;}
#conditions {position: absolute; left: 502px; top: 56px;}
#location {position: absolute; left: 583px; top: 62px;}
#contact {position: absolute; left: 650px; top: 56px;}
#links {position: absolute; left: 710px; top: 62px;}

#table {position: absolute; left: 0px; top: 110px;}
-->	   
</style>

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>

<div id="logo"><a href="../"><img src="../images/logo.jpg" width="150" height="108" align="left" border="0" alt="Home"></a></div>
<div id="about"><a href="../aboutus.html">About<br />  Us</a></div> 
<div id="trips"><a href="../trips.html">Trips</a></div>
<div id="guides"><a href="../guides.html">Guides</a></div>
<div id="travel"><a href="../travel.html">Fishing<br />Travel</a></div>
<div id="store"><a href="../catalog/index.php">Online<br /> Store</a></div>
<div id="photos"><a href="../photos.html">Photos &<br />   Flies</a></div>
<div id="conditions"><a href="../conditions.html">  Current<br />Conditions</a></div>
<div id="location"><a href="../location.html">Location</a></div>
<div id="contact"><a href="../contact.html">Contact<br />	Us</a></div>
<div id="links"><a href="../links.html">Links</a></div>

<div id="table">
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
<td class="headerNavigation">  <?php echo $breadcrumb->trail(' ? '); ?></td>
<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
</div>
<?php
 }
?>

 

to get you SSL working you need to configured your 2 configure.php files

 

your (catalog)/includes/configre.php is:

 

<?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', 'https://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://www.yourdomain.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.yourdomain.com');
 define('HTTPS_COOKIE_DOMAIN', 'www.yourdomain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');

 

and your (catalog)/admin/includes/configure.php is:

 

<?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', 'https://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_CATALOG_SERVER', 'https://www.yourdomain.com');
 define('HTTPS_CATALOG_SERVER', 'http://www.yourdomain.com');
 define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module

Wade Morris

Amarillo, Texas

 

Before you do any changes on your site you need to do BACKUP! BACKUP!

Posted

I've done the configure files and have a secure connection, the problem is that for some reason the links to images in my header are still insecure and causing the "secure and insecure" warning message to appear. I thought I had fixed it by taking out the 'http://' in the links but obviously that did not work. The images are on the server, otherwise they'd be broken...or do I need to put duplicate images on the server somewhere else? I don't know, I'm so confused by this and so frustrated, was trying to get this store up and running for him by the holidays :(

Posted

you have errors, you are using a shared ssl thus you need to change your configure.php file to properly point there. also you have two // prior to catalog when going to the secure site.

Posted

I seem to have finally got it working right. The only error message I'm getting now is in IE Mac & it's about the ssl issuer, so we're going to have to hand that one over to his web host who the ssl is from. Hopefully they will take care of it.

 

My only other question for now is, can I have links in my header file to insecure pages? The menu links to all the other non-store pages of his site, and right now as it is the links turn all of those pages into secure pages as well (and of course they contain insecure images, etc). Can I have regular 'http://' links in my store header file? If I can't then how do I link to insecure pages?

Posted
Can I have regular 'http://' links in my store header file? If I can't then how do I link to insecure pages?

 

You can have non secure links only on http pages or you will get the warning. Here is one solution:

<?php if ($request_type == NONSSL) { /* only show links in NON SSL else it causes warning */
?> 
PLACE LINK OR IMAGE HERE
<?php } ?>

Use this code and the links show up, but if you go to a secure page, they do not and therefore no warning message.

 

Tim

Posted

I'm not sure what the point in using that code is, if it makes my links dissapear on a secure page??

 

I know it's possible to have links on a secure page that take the user to non-secure pages. I just have no idea how to code it??

Archived

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

×
×
  • Create New...