Date: 12/22/99
- Next message: Andrei Zmievski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Previous message: Thies C. Arntzen: "[PHP-DEV] cvs: /php3 ChangeLog /php3/functions iptc.c"
- In reply to: Michael Bushey: "[PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 22 Dec 1999, Michael Bushey wrote:
> Not only does session_destroy not work, but if I use
> session_unset("varname"); the variable remains with the old value. The ONLY
> way I can clear out a session variable is to do a session_register and the
> set the variable to 0.
>
> example:
> page1:
> session_unset("IDmember");
>
> page2:
> session_register("IDmember");
> echo "IDmember: "$IDmember;
>
> page2 result:
> IDmember: 5
>
> If I were to change page 1 to
> session_register("IDmember");
> $IDmember=0;
> then I would get 0 out of the page2 result, which is effectivly cleared, but
> it bothers me that none of the session functions other than session_register
> work at all.
All the functions work properly, let's go through it step by step.
page1:
session_unset("IDmember");
Firstly, session_unset() does not take parameters, it simply clears all
the session variables. Secondly, I suspect what is happening here is
that your session is not started at all on page1 since you didn't call
session_start() or have session.auto_start = 1. Now, on page2, you have
session_register() which automatically starts the session and your value
for IDmember comes back and then saved back out to disk after script
finishes running.
-Andrei
* I don't mind going nowhere as long as it's an interesting path. *
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrei Zmievski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Previous message: Thies C. Arntzen: "[PHP-DEV] cvs: /php3 ChangeLog /php3/functions iptc.c"
- In reply to: Michael Bushey: "[PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Next in thread: Andrei Zmievski: "Re: [PHP-DEV] Re: PHP 4.0 Bug #3021 Updated: session_destroy does not work"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

