Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SSL in admin "SHOWS" the lock but...


inovrhd

Recommended Posts

Posted

Hello,

 

I looked through the help site and discovered a possible solution to the admin section not appearing secure (no lock showing on the left side of the admin menu):

 

 

by placing the following code in the catalog/admin/includes/application_top.php file

 

if($_SERVER['SERVER_PORT'] == 80) {

Header("Location: " . HTTPS_CATALOG_SERVER . DIR_WS_ADMIN);

exit;

}

 

BUT NOW, for some reason, I get to my admin menu page (which I see that now the lock is on), and the address in the top bar suggests https:// etc, but I am in a loop that keeps me on the admin menu. I can click any of the menu options, and I just loop back to the menu page...

 

Any ideas on what I might be doing wrong?

 

Thanks for your feedback.

Posted

I tried the same contribution, and got the same results.

 

I had to remove it.

 

I think the whole thing is flawed and should be removed.

<_<

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted
I tried the same contribution, and got the same results.

 

I had to remove it.

 

I think the whole thing is flawed and should be removed.

<_<

 

 

just curious, who is your host?

Posted

That contribution doesn't make any sense at all.

 

If you have a full ssl certificate then you should be able to keep the admin under https.

 

Vger

Posted

IXWebhost.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

OK.

 

I "cheated" and have 100% SSL in the Admin now.

 

In my /admin/includes/functions/html_ouput.php, I made this ONE change:

 

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {
if ($page == '') {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
}
if ($connection == 'NONSSL') {
//  > > > > > . LOOK HERE: the changed line is the line below this comment < < < < <------- LOOK HERE! LOOK HERE! LOOK HERE! < < < < < < < < 
  $link = HTTPS_SERVER . DIR_WS_ADMIN;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL == 'true') {
	$link = HTTPS_SERVER . DIR_WS_ADMIN;
  } else {
	$link = HTTP_SERVER . DIR_WS_ADMIN;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');
}
if ($parameters == '') {
  $link = $link . $page . '?' . SID;
} else {
  $link = $link . $page . '?' . $parameters . '&' . SID;
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

return $link;
 }

I forced all the links to be HTTPS.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

just define in admin configure file both http server and https server path to be https.

plus set ssl to true.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Archived

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

×
×
  • Create New...