Re: sessions without cookies ???
| From: | dbarber | Date: | Tue, 10 Oct 2000 13:03:22 +0000 |
| Subject: | Re: sessions without cookies ??? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19330@lists.php.net to get a copy of this message | ||
You can use sessions without cookies. In fact, I am in the process of
moving my entire site off of cookies. I had to figure this out the hard
way. Here are the limitations:
1) you cant use any of PHPs prebuilt session functions, they all use
cookies.
2) you can't use --enable-trans-sid... it only works with the prebuilt
functions.
So, what I am doing is :
Every time someone hits any page on my site, if $session is not set, it
writes /tmp/$session.php ($session being a randomly generated string). I
include this file at the top of every page. I write all of the necessary
user variables to this file. Then, all I have to do is append
?session=$session to every link and pass $session in hidden fields with
every form. If you are using templates this is not difficult to implement.
I would appreciate any feedback on this system, and I hope that helps.
Dan
On Tue, 10 Oct 2000 hentis@twilyt.com wrote:
> Hi there ..
>
> somebody pointed out that session doesn't work without using cookies ..
> I thought sessions is a good way to NOT use cookies.
>
> can somebody comment ?
>
> Henti
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>