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