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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Logout page needs a refresh to take effect

Thread began 9/14/2010 4:03 pm by georgevargasa302189 | Last modified 9/21/2010 12:44 pm by Jason Byrnes | 1471 views | 13 replies |

georgevargasa302189

Logout page needs a refresh to take effect

Once a user is logged in they can navigate to the logout page generated by SecurityAssist.

The problem is that the logout does not take effect unless I refresh the page with the browser. I can tell because I can still access restricted pages, until I do a refresh of the logout page.

Is there a solution to this to force the logout to take effect?

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the logout page so I cn take a look at the cod?
it should take effect without needing to be refreshed.

Sign in to reply to this post

georgevargasa302189

I am sending you the login page and the logout page.

I don't see where the session UserID is set when you login in. Maybe the log out problem is really a problem with the session values not being set or cleared with login and logout.

Attached Files
users_LogIn.zip
users_LogOut.zip
Sign in to reply to this post

Jason ByrnesWebAssist

try changing the line at the end:

php:
session_destroy(); 

?>




to:

php:
session_destroy(); 

session_start();
session_regenerate_id(TRUE);
?>
Sign in to reply to this post

georgevargasa302189

The logout page still needs to be refreshed for it to take effect.

I am checking this out in two ways;
1. I have a documentation page should not display unless the user is logged in, and it still displays.

2. Also my cart is not cleared out.

However if refresh the logout page, these two cases work fine.

I am using internet explorer 8.

Sign in to reply to this post

Jason ByrnesWebAssist

I'm wondering if the https redirect code isnt causing the issue, try changing:

php:
<?php if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://" $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?>

<?php
if (!isset($_SESSION)) {
  
session_start();
}
?><?php 
if (!session_id()) 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]);
        }
    }
}
?>





to:

php:
<?php

if (!isset($_SESSION)) {
  
session_start();
}
?><?php 
if (!session_id()) 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]);
        }
    }
}
?>
<?php 
if((!(isset($_SERVER['HTTPS']))) || ($_SERVER['HTTPS'] == "") || ($_SERVER['HTTPS'] == "off"))header("Location: https://" $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']); ?>
Sign in to reply to this post

georgevargasa302189

Yes thank you very much,

I changed it so the page was forced to be HTTP: instead of HTTPS: and that fixed it.

There is no reason for the logout page to be secure.

It works fine now!

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear it is working.

Sign in to reply to this post

georgevargasa302189

One issue related to this is I have a page which must be secure with a similar issue.

It is a registration update page. If I try to run it as a secure page the UserID seems to be old and not the one for the person just logged in.

If I make the page unsecure it works correctly.

I tried moving the code down which makes the page secure but it got the problem back.

Is there a way to avoid this issue and still make the page secure?

I have attached the page. (this is the version which works correctly, that is the unsecured version.)

Attached Files
users_Profile.zip
Sign in to reply to this post

Jason ByrnesWebAssist

this suggests that your secure domain and unsecured domain use different browsing session.


what is the url to the secure domain and the unsecured domain?

If they are the same, they should not use differant browsing session.


On an unsecured page add the following:

php:
<?php echo session_id(); ?>




add that same code to a secured page.

the id's should be the same, if they are not, contact your host to find out why the secure and unsecured domains are using different sessions.

Sign in to reply to this post
loading

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