Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

checkout and login sessions not working


Guest

Recommended Posts

Posted

The shopping cart feature works well, as users can add/remove/change items within their cart with no problem. However, when checking out, users are asked to login. This process empties the shopping cart so users cannot buy what they are after. If the user goes back to shopping again, their cart is full with their previously selected items and they are logged out. But, when trying to checkout again, they have to login again and the cart empties. It's a repeating cycle.

 

Background - the site is hosted on a shared server. The site is NFP Store.

 

Can someone please guide me in fixing this issue?

 

Thanks!

Posted
It is a problem with https cookie domain and https cookie path.

 

Look at this thread.

 

Thanks for the info! For sure I thought you were on to something here. I read the thread and made the necessary changes to configure.php:

 

define('HTTP_SERVER', 'http://www.nfpstore.com');

define('HTTPS_SERVER', 'https://tesla.xrackhosting.net/~nfpstore');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.nfpstore.com');

define('HTTPS_COOKIE_DOMAIN', 'https://tesla.xrackhosting.net/~nfpstore');

define('HTTP_COOKIE_PATH', '/oscommerce/catalog/');

define('HTTPS_COOKIE_PATH', '/oscommerce/catalog/');

define('DIR_WS_HTTP_CATALOG', '/oscommerce/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/oscommerce/catalog/');

 

However, as soon as you enter "https" on the site now, you get this error:

 

Warning: mysql_connect(): Access denied for user: 'nfpstore@localhost' (Using password: YES) in /Users/nfpstore/Sites/oscommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Line 19 = $$link = mysql_connect($server, $username, $password); - as part of the tep_db_connect function.

 

Again, any suggestions would be GREATLY appreciated! Thanks again for the help so far!

 

-G

Posted

I meant to say that my configure.php looks like this now (changes made are bold below):

 

define('HTTP_SERVER', 'http://www.nfpstore.com');

define('HTTPS_SERVER', 'https://tesla.xrackhosting.net/~nfpstore');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.nfpstore.com');

define('HTTPS_COOKIE_DOMAIN', 'tesla.xrackhosting.net/~nfpstore');

define('HTTP_COOKIE_PATH', '/oscommerce/catalog/');

define('HTTPS_COOKIE_PATH', '/oscommerce/catalog/');

define('DIR_WS_HTTP_CATALOG', '/oscommerce/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/oscommerce/catalog/');

 

 

Still, I get the following mysql_connect error:

 

Warning: mysql_connect(): Access denied for user: 'nfpstore@localhost' (Using password: YES) in /Users/nfpstore/Sites/oscommerce/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Any ideas?

Posted

I fixed it! The site is workng now!

 

Thanks again, TomThumb, for your help! Your suggestions were exactly what I needed.

 

-G

Archived

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

×
×
  • Create New...