close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

sigh.... sessions not destroyed after checkout

Thread began 1/23/2013 12:00 pm by robert254422 | Last modified 7/10/2013 12:03 pm by robert254422 | 6007 views | 5 replies

robert254422

sigh.... sessions not destroyed after checkout

I have a ticket open for this issue and other big ones which still are not resolved, but I can not get skype to work in any fashion... So this type of support will just not work for me... I have several sites using ecart and not one of them uses the same code to destroy sessions after checkout success... Because what works in one site does nothing in another regarding destroying this session... Which at it selve is a big mystery to me... I have tried every form of destroy code session I can find on this forum but none do the trick for me in my latest attempt to use ecart on a new project... Nore do the ones that do do the trick in my other projects... This is just bizar... ALl I need is the session to be destroyed so that when you decide to place another order it does not get the same orderid... This is just not happening...

I also see posts of people saying the session gets destroyed without the added code after </html> on the success page... I just don't get it...

Here are the ones I have tried.
<?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();
?>

+

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();

+

<?php
session_unset();
session_destroy();
session_write_close();
setcookie(session_name(),'',0,'/');
?>

+
<!-- CLEAR CART SESSIONS -->
<?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();
unset($_SESSION);
session_start();
session_regenerate_id();

?>

AND

every other piece of similar code I could find on this forum... But it just will not get deleted after success...

How hard can this be?

ALSO
After placing the destroy code after </html> I get messages like:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at xxxxx\winkel_checkout_success.php:143) in xxxxx\winkel_checkout_success.php on line 161 Warning: session_regenerate_id(): Cannot regenerate session id - headers already sent in xxxx\winkel_checkout_success.php on line 162

I figured I'd download and reinstall the whole ecart extension rebuilt it AGAIN but nothing...

Besides renaming some form field names everything in the store pages is as generated by the wizard... no modifications and no user registration etc...

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...