Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL Support - No "Lock" in browser


edukes

Recommended Posts

Posted

Hello,

 

I am having problems getting the lock to stay locked in SSL mode. I have read numerous threads about line 41 in /includes/application_top.php. I tried several suggestions but can't seem to get the right one. Did anyone ever figure out the "correct" solution for this problem?

 

TIA

Posted
Did anyone ever figure out the "correct" solution for this problem?

 

TIA

Hundreds if not thousands of people have "figured out" the correct solution. It's not rocket science.

 

Link to site?

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

I added the following to my application_top.php :

 

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

 

As soon as you access the site, the certificate pops up.

 

I tried I added the following to my application_top.php :

 

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

 

but that doesn't work either.

 

My output from the script found in another thread, myenv.php:

 

$HTTP_HOST = secure.palmettoshopper.com

$HTTPS_HOST =

getenv('SERVER_PORT') = 443

getenv('HTTPS') =

getenv('HTTP_X_FORWARDED_SERVER') =

getenv('HTTP_X_FORWARDED_HOST') =

getenv('HTTP_X_FORWARDED_BY') =

$_SERVER['HTTPS'] =

getenv('DOCUMENT_ROOT') = /home/palmetto/public_html/www.palmettoshopper.com

$DOCUMENT_ROOT = /home/palmetto/public_html/www.palmettoshopper.com

 

I saw something about images being the cause and I do have images starting with http:// which is probably the cause, but don't know how to fix them. How do I do that?

 

TIA

Posted
I added the following to my application_top.php :

 

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

 

As soon as you access the site, the certificate pops up.

 

I tried I added the following to my application_top.php :

 

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

 

but that doesn't work either.

 

My output from the script found in another thread, myenv.php:

 

$HTTP_HOST = secure.palmettoshopper.com

$HTTPS_HOST =

getenv('SERVER_PORT') = 443

getenv('HTTPS') =

getenv('HTTP_X_FORWARDED_SERVER') =

getenv('HTTP_X_FORWARDED_HOST') =

getenv('HTTP_X_FORWARDED_BY') =

$_SERVER['HTTPS'] =

getenv('DOCUMENT_ROOT') = /home/palmetto/public_html/www.palmettoshopper.com

$DOCUMENT_ROOT = /home/palmetto/public_html/www.palmettoshopper.com

 

I saw something about images being the cause and I do have images starting with http:// which is probably the cause, but don't know how to fix them. How do I do that?

 

TIA

 

 

I had a similar problem, and it was the images being loaded from an unsecure url. There may be a contribution somewhere, but I cobbled up my own fix. Go to:

 

catalogs/includes/functions/html_output.php

 

in the tep_image function, around line 82, change what is there to this:

 

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { //*** 2005-06-17 added/changed these 6 lines

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

$image = '<img src="' . $link . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';

} else {

$image = '<img src="' . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';

}

 

What this does is check if the url is secure. If it is, it uses the secure url path to the images, otherwise the regular unsecure path. It's a hack, but it works.

 

Good Luck,

Matt

Posted
I had a similar problem, and it was the images being loaded from an unsecure url. There may be a contribution somewhere, but I cobbled up my own fix. Go to:

 

catalogs/includes/functions/html_output.php

 

in the tep_image function, around line 82, change what is there to this:

 

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { //*** 2005-06-17 added/changed these 6 lines

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

$image = '<img src="' . $link . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';

} else {

$image = '<img src="' . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';

}

 

What this does is check if the url is secure. If it is, it uses the secure url path to the images, otherwise the regular unsecure path. It's a hack, but it works.

 

Good Luck,

Matt

 

Hello Matt,

 

Thanks!

 

Can you tell me which lines you took out. I think what I need to take out is around line 77 for me but not 100% sure.

 

Thanks!!!!!!

Posted
Hello Matt,

 

Thanks!

 

Can you tell me which lines you took out. I think what I need to take out is around line 77 for me but not 100% sure.

 

Thanks!!!!!!

 

Sure. I changed line 81 in the original osCommerce file, and made it into the above-posted 6 lines of if--else-- conditions. You can check it with a good text comparison tool, like WinMerge (Google it).

 

Matt

Posted
Sure. I changed line 81 in the original osCommerce file, and made it into the above-posted 6 lines of if--else-- conditions. You can check it with a good text comparison tool, like WinMerge (Google it).

 

Matt

 

Hello Matt,

 

Thanks for getting back to me.

 

I guess what I should have asked was what did you take out.

 

Thanks

Posted
Hello Matt,

 

Thanks for getting back to me.

 

I guess what I should have asked was what did you take out.

 

Thanks

 

Basically I changed the stock version of line 81:

 

$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

 

into the above 6 lines of code I posted earlier.

Archived

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

×
×
  • Create New...