Forum Moderators: coopster

Message Too Old, No Replies

php sessions shopping cart

Problems with sessions not ending and shopping cart not working properly

         

omelette

9:33 pm on Aug 9, 2006 (gmt 0)

10+ Year Member



I have been recently trying to set up an online shop using a free shopping cart package (Shop Script). I set this up on my personal website to test it out and there were no visible problems. The person I am making the site for then decided they would prefer to use Lycos eshop instead. Once the package had been purchased it was found that it did not meet our requirements so I transferred the shop script cart over to this space.

I now found that the shopping cart is randomly filled with items from time to time, there is no apparant pattern to when this occurs only that the items added are items that were earlier added to the cart.

From what I can tell it appears that when I empty the cart, the session is cleared but then when I load a page, data is being put back in to the session!

I am using PHP version 4.3.9. Lycos seem to have disabled a few PHP functions, (sessions are not one of them) not sure if this has anything to do with it.

I have noticed that the session.cookie_lifetime is not set to 0 so the session is not ending when the browser is closed, i am wondering if this has something to do with it.

Does anyone have any idea what the problem is and a possible solution.

coopster

3:00 pm on Aug 21, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, omelette.

That is likely a good start. Also, read through a few past threads here on WebmasterWorld, particularly Session is timing out - how do I increase cookie time? [webmasterworld.com] and the links within to learn more about PHP Session Handling.