Re: Destroying Ssessions
| From: | Chris Lee | Date: | Fri, 02 Nov 2001 01:03:05 +0000 |
| Subject: | Re: Destroying Ssessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-73208@lists.php.net to get a copy of this message | ||
destroying session vars never worked for me either. it hasnt for quite some
time. now why its important you destoy them other then cleanup, I dont know
your reasons. Im going to guess.
- you store username/passwd in sessions and because httpd runs as nobody,
anyone on the server can read them. ans: chroot telnet, telnet, ftp, it
should be done anyhow. dont store passwd's in plain text, encypt them and
compare the encryped passwd to the storeed encrypted passwd on the server,
if correct, great. you should do it this way anyhow.
- your finatical about cleanlyness and code perfect. ans: so am I. I rip
hair out and call it a day. dont stress it.
- you think you *have* to do this just to get sessions working: ans: wrong
- you think these files will stay on the server forever and fill your HD.
ans: wrong, check php.ini for session_gc (garbage collection)
email me any questions.
--
Chris Lee
lee@mediawaveonline.com
"Richard Baskett" <rick@baskettcase.com> wrote in message
news:B8071497.56B3%rick@baskettcase.com...
> Unusual that I didnt even get one response, so I shall try again! :)
>
> Ok why does this not work?
>
> session_name(adminid);
> session_start();
> unset($sess);
> session_unset();
> session_destroy();
> session_write_close();
> $sess = 0;
>
> etc etc etc etc etc etc..
>
> After all that is executed I take a look at the session file and what do I
> see? All the session variables still there... and the file still there
> also! How can I get rid of them?
>
> Rick
>