You are here: Re: _SESSION weirdness behind a NAT firewall/router: bug? « PHP Programming Language « IT news, forums, messages
Re: _SESSION weirdness behind a NAT firewall/router: bug?

Posted by Rik on 07/30/06 04:37

axlq wrote:
> So here's my logout.php script for all
> user types. It does seem to work correclty:

I'm missing session_start() here.....

> $CookieInfo = session_get_cookie_params();
> $_SESSION = array(); // unset all session values
>
> if ((empty($CookieInfo['domain'])) &&
> (empty($CookieInfo['secure']))) setcookie(session_name(), '',
> time()-3600, $CookieInfo['path']); elseif
> (empty($CookieInfo['secure'])) setcookie(session_name(), '',
> time()-3600, $CookieInfo['path'], $CookieInfo['domain']);
> else
> setcookie(session_name(), '', time()-3600, $CookieInfo['path'],
> $CookieInfo['domain'], $CookieInfo['secure']);
> unset($_COOKIE[session_name()]);
> session_destroy();

What if you just:

session_save_path('/home/mydomain/public_html/lists');
session_name('login_settings');
session_start();
set_cookie(session_name(),'',time()-3600,'/');//or your snippet offcourse
$_SESSION = array();
session_destroy();

Else, I'm very curious wether you cookies are actually deleted or not, and
if not, what they hold.

Grtz,
--
Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация