Re: [PHP] Unsetting Session Variables
Are you doing a session_start() on the page you are unsetting on? Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Wed, 30 Oct 2002, David Russell wrote: Hi all, I am having problems unsetting Session Variables - where I know it should work. I have a form. It contains both links with GET variables, and also a POST form. They all go to the same next page. Page 2 simply clears all session variables, and then sets them based upon the contents of the GET or POST array. It then calls page 3 which displays information based on the SESSION variable contents. My problem is that a session variable does not seem to unset. I am using: unset ($_SESSION['variablename']); But this does not seem to destroy the session variable. (it is still available later in other scripts) What can I do? David Russell IT Support Manager Barloworld Optimus (Pty) Ltd Tel: +2711 444-7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unsetting Session Variables
-Original Message- From: David Russell [mailto:DavidR;BarloworldOptimus.com] Sent: 30 October 2002 14:32 I am having problems unsetting Session Variables - where I know it should work. I have a form. It contains both links with GET variables, and also a POST form. They all go to the same next page. Page 2 simply clears all session variables, and then sets them based upon the contents of the GET or POST array. It then calls page 3 which displays information based on the SESSION variable contents. My problem is that a session variable does not seem to unset. I am using: unset ($_SESSION['variablename']); But this does not seem to destroy the session variable. (it is still available later in other scripts) What can I do? PHP version? register_globals on or off? Using only $_SESSION, or are there any session_register() calls? All of these can affect what you have to do to destroy session values, but... Have you tried doing session_unregister('variablename') *in* *addition*? Does session_write_close() help? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Unsetting Session Variables
PHP 4.2.2 Register Globals Off Using only $_SESSION No session_register() calls at all Interestingly enough, doing session_unregister('variablename') *in* *addition* does work (although I am sure it shouldn't) session_write_close() does not help Any suggestions? -Original Message- From: David Russell [mailto:DavidR;BarloworldOptimus.com] Sent: 30 October 2002 14:32 I am having problems unsetting Session Variables - where I know it should work. I have a form. It contains both links with GET variables, and also a POST form. They all go to the same next page. Page 2 simply clears all session variables, and then sets them based upon the contents of the GET or POST array. It then calls page 3 which displays information based on the SESSION variable contents. My problem is that a session variable does not seem to unset. I am using: unset ($_SESSION['variablename']); But this does not seem to destroy the session variable. (it is still available later in other scripts) What can I do? PHP version? register_globals on or off? Using only $_SESSION, or are there any session_register() calls? All of these can affect what you have to do to destroy session values, but... Have you tried doing session_unregister('variablename') *in* *addition*? Does session_write_close() help? Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 smime.p7s Description: application/pkcs7-signature
RE: [PHP] Unsetting Session Variables
-Original Message- From: David Russell [mailto:DavidR;BarloworldOptimus.com] Sent: 30 October 2002 15:30 To: 'Ford, Mike [LSS]' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Unsetting Session Variables PHP 4.2.2 Register Globals Off Using only $_SESSION No session_register() calls at all Interestingly enough, doing session_unregister('variablename') *in* *addition* does work (although I am sure it shouldn't) Yes, that's my interpretation, too -- but if doing the wrong thing gets the right answer, go for it! (Just be aware it might be different in 4.3!) Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting Session Variables
I have noticed this behavior before, and I find it very inconsistent. Does anybody know if this is going to be fixed? Ford, Mike [LSS] wrote: -Original Message- From: David Russell [mailto:DavidR;BarloworldOptimus.com] Sent: 30 October 2002 15:30 To: 'Ford, Mike [LSS]' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Unsetting Session Variables PHP 4.2.2 Register Globals Off Using only $_SESSION No session_register() calls at all Interestingly enough, doing session_unregister('variablename') *in* *addition* does work (although I am sure it shouldn't) Yes, that's my interpretation, too -- but if doing the wrong thing gets the right answer, go for it! (Just be aware it might be different in 4.3!) Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting Session Variables
I can't say that I've noticed this in 4.2.3. I just wrote an application where all I used was $_SESSION and unset() and it worked perfectly. ---John Holmes... - Original Message - From: Marek Kilimajer [EMAIL PROTECTED] To: PHP [EMAIL PROTECTED] Sent: Wednesday, October 30, 2002 11:34 AM Subject: Re: [PHP] Unsetting Session Variables I have noticed this behavior before, and I find it very inconsistent. Does anybody know if this is going to be fixed? Ford, Mike [LSS] wrote: -Original Message- From: David Russell [mailto:DavidR;BarloworldOptimus.com] Sent: 30 October 2002 15:30 To: 'Ford, Mike [LSS]' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Unsetting Session Variables PHP 4.2.2 Register Globals Off Using only $_SESSION No session_register() calls at all Interestingly enough, doing session_unregister('variablename') *in* *addition* does work (although I am sure it shouldn't) Yes, that's my interpretation, too -- but if doing the wrong thing gets the right answer, go for it! (Just be aware it might be different in 4.3!) Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php