close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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 Jason Byrnes | 6203 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...

Sign in to reply to this post

Jason ByrnesWebAssist

not sure why the session destroy code would not be working for you, i have not run into an instance where it didn't.

another option would be to use code to unset any sessions that are set on the success page, for example:

php:
<?php 

@session_start();
if (
"" == ""){
  
// WA_ClearSession
    
$clearAll TRUE;
    
$clearThese explode(",","");
    if(
$clearAll){
        foreach (
$_SESSION as $key => $value){
            unset(
$_SESSION[$key]);
        }
    }
    else{
        foreach(
$clearThese as $value){
            unset(
$_SESSION[$value]);
        }
    }
}
?>




this will loop through the entire session collection and unset each session. it wont create a new session ID though, which is what the session_stray code does.


as far as support and Skype, we need to have some way of communication, we use skype as it is the easiest and it is free. with skype we can do a chat session, or a phone call. if skype will not work, we can find another way of doing a chat session. maybe sign up for a hotmail account, and install adium or another chat client, and we can start a chat session that way?

normally we use adobe connect to do a screen sharing session, and skype chat or a skype phone call, but we can find other ways of starting a chat.

Sign in to reply to this post

robert254422

late response regarding clearing session after purchase complete

Hello Jason,

I never saw your latest reply or got notification for it... I will check my preferences after this... My apologies for not responding earlier...

Sign in to reply to this post

Jason ByrnesWebAssist

Originally Said By: robert254422
  Hello Jason,

I never saw your latest reply or got notification for it... I will check my preferences after this... My apologies for not responding earlier...  
Sign in to reply to this post

robert254422

I will try to sort it out with Skype... Alternatively is Google hangrout an option?

TY for your reply.

wkr

rv

Sign in to reply to this post

Jason ByrnesWebAssist

Originally Said By: robert254422
  I will try to sort it out with Skype... Alternatively is Google hangrout an option?

TY for your reply.

wkr

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