close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

session still not destroyed after purchase

Thread began 6/06/2012 6:10 am by robert254422 | Last modified 6/19/2012 10:21 am by Jason Byrnes | 951 views | 6 replies |

robert254422

session still not destroyed after purchase

Hello,

My check out succes and failure page have the following code in place below: </html>...
Although this clears the products the orderreference id stays the same if you go shopping after having paid a previous order...

<?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
@session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
@setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}

// Finally, destroy the session.
@session_destroy();
@session_regenerate_id();
?>

I have tried (based on examples in this forum) the following also:
1. No @ before session_destroy en regenerate
2. start session after regenerate_is.

But nothing helps the id stays the same on continueing to shop after a purchase has been made (no store user sessions used...)

Sign in to reply to this post

robert254422

It gets stranger

I have an almost identical version of ecart (except for the layout of the site around it that does destroy the session id and when using that version checkout succes page all works fine up to the point where I start customiszing the page again and add the following: <div id="header_container">
<img src="lay-out/logo-beeld.gif" width="50" height="50" /> <img src="lay-out/2011-logo.gif" width="425" height="30">
</div>

As soon as I put this div in the checkout succes page the sessions stop being destroyed... I have tried this many times and it really stops destroying from the moment I add the above html to the check out success page... This is very weird...

Some help would be appreciated...

wkr

RV

Sign in to reply to this post

Jason ByrnesWebAssist

try changing this code:

// Finally, destroy the session.
@session_destroy();
@session_regenerate_id();


to:

// Finally, destroy the session.
@session_regenerate_id();
@session_destroy();
@session_start();
@session_regenerate_id();


I have seen some servers hold onto the ID when they should not be.

Sign in to reply to this post

robert254422

No success - clarify

Hello Jason ty for your response.

// Finally, destroy the session.
@session_destroy();
@session_regenerate_id();

Actually works fine as long as I leave out the following piece of html.
<div id="header_container">
<img src="lay-out/logo-beeld.gif" width="50" height="50" /> <img src="lay-out/2011-logo.gif" width="425" height="30">
</div>

I have changed it to
// Finally, destroy the session.
@session_regenerate_id();
@session_destroy();
@session_start();
@session_regenerate_id();

as you suggested.
However this caused the session not to be destroyed with or without mentioned html.

Also I am sometimes getting double shipping. This is not supposed to happen in 1 order.
Say Rule: World 5 KG Max is 25,60 gets shown twice on the confirm page and added twice to the total

Any ideas?

WKR

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

robert254422

No support ticket

Thank you for your reply. I clicked the link but I dont see a new support ticket in my list???

WKR
RV

Sign in to reply to this post

Jason ByrnesWebAssist

should be there now, i have recreated it.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...