0

why header("location:address"); after destroy session return this error in firefox! :|

The connection was reset
  The connection to the server was reset while the page was loading.

  The site could be temporarily unavailable or too busy. Try again in a few
    moments.
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

its my code:

if ($cmd == "cwLogOut" or ! is_array ( $cwUserInfo )) {

    if ($_SESSION ['log'] == 1) {
        $msg = $cwlang ['log'] ['user'] . "[" . $cwUserInfo ["username"] . "]" . $cwlang ['log'] ['logout'];
        $asterisk->putLog ( $cwUserInfo ["username"], $cwUserInfo ["fullname"], 6, "logout", $cmd, $msg );
    }

    setcookie ( "cwUserId", $uid, time () - (3600 * 24 * 365), "/" );
    unset ( $_SESSION );
    unset ( $_SESSION ['cwUserId'] );
        session_destroy ();
    header("location:http://cas.local");
}
Samira Khorshidi
  • 963
  • 1
  • 9
  • 29

2 Answers2

1

i use exit(header("location:http://cas.local")); and it's work,tanks every one.

Samira Khorshidi
  • 963
  • 1
  • 9
  • 29
0

Yeah, try to use use the ob_start() to cache the output