Jump to content

Archived

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

ezfindit

SSL Login Path Glitch on Checkout When User Logs in After Adding Items to Cart

Recommended Posts

I need some help figuring out a small glitch in the SSL checkout process.

User Already Logged in - SSL Works Perfectly
If a user is already logged in, adds items to the Shopping Cart, and clicks the Checkout button, the process works perfectly and the user continues the checkout process:

https://www.newhallstudios.com/~station/estore/checkout_shipping.php

User Not Logged in - SSL Path Glitch
However, if a user is not originally logged in, adds items to the shopping cart (without logging in), then clicks the Checkout button, and logs in, then the path is screwed up and an extra "n/estore" gets inserted when the user is returned to the checkout_shipping.php page with the Page Not Found error:

https://www.newhallstudios.com/~station/estore/n/estore/checkout_shipping.php

I believe the glitch is somewhere in the login.php page and the way the href_link is passed depending on whether the user is logged in or not.  When using SSL it somehow screws up the path (looks like paths are crunched, the "n" is last letter from /~station).

Here's the SSL setup in the configure.php file:
  define('HTTPS_SERVER', 'https://www.newhallstudios.com/~station');

I've researched this all day and looked at the login.php code and various settings to figure it out.  I'm stuck!


Does anyone have any ideas how to fix the path issue? 


Chris

Share this post


Link to post
Share on other sites
4 hours ago, Dan Cole said:

Interesting...what does the rest of your configuration file look like...minus your login details?

Dan

Here t'is:

  define('HTTP_SERVER', 'http://www.newhallstation.net');
  define('HTTPS_SERVER', 'https://www.newhallstudios.com/~station2');
  define('ENABLE_SSL', true);
  define('HTTP_COOKIE_DOMAIN', '.www.newhallstation.net');
  define('HTTPS_COOKIE_DOMAIN', '.www.newhallstudios.com/~station2');
  define('HTTP_COOKIE_PATH', '/estore/');
  define('HTTPS_COOKIE_PATH', '/estore/');
  define('DIR_WS_HTTP_CATALOG', '/estore/');
  define('DIR_WS_HTTPS_CATALOG', '/estore/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  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', '/home/station2/public_html/estore/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 


Chris

Share this post


Link to post
Share on other sites

FYI, I get the same path scrambling problem with the "n/store" being inserted in the URL when user tries to access My Account before logging in:
https://www.newhallstudios.com/~station/estore/n/estore/account.php

User Logged in (via SSL) - everything works perfectly
login.php >> account.php  = works!
login.php >> shopping_cart.php  = works!
login.php >> shopping_cart.php  >> checkout_shipping.php  = works!
login.php >> all other *.php pages  = works!

User Not Logged in - URL Path Error (extra "n/store" inserted)
account.php  >> login.php  >> account.php   = fails with URL glitch
https://www.newhallstudios.com/~station/estore/n/estore/account.php

shopping_cart.php >> checkout_shipping.php  >> login.php  >> checkout_shipping.php  = fails with URL glitch
https://www.newhallstudios.com/~station/estore/n/estore/checkout_shipping.php

There seems to be a coding mismatch with SSL paths in the way the original href information is being passed between account.php and login.php and checkout_shipping.php and login.php. If user is logged in (via SSL) first there's not glitch.


Chris

Share this post


Link to post
Share on other sites
15 minutes ago, Dan Cole said:

Is there a reason you're adding the ~station2?   Usually you just change the http to https.

Dan

I have an SSL certificate on my main domain that I share across several other sites. "station2" is the account for www.newhallstation.net.  I will eventually go to dedicated SSL but the current one is valid until 2019 and it works perfectly, except for the SSL login sequence glitch. 

FYI, I posted more information on the sequence of pages.  Whens user logs in via SSL, then everything works perfectly!


Chris

Share this post


Link to post
Share on other sites

FOUND the SOLUTION!!!!  After 3 days and 20+ hours of work and more than a dozen different attempts to fix, it's corrected!

This contribution fixed it:

Login and Return to same page - https://apps.oscommerce.com/18BnN

Site is working perfectly now with shared SSL regardless of login sequence.  No more url path errors!  Woo Hoo!

Thank you kgtee!!! :wub:

 


Chris

Share this post


Link to post
Share on other sites

×