RE: What is the purpose of sessions extension?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In my office we found it to be quite quick and easy to write a library
which uses PHP session extensions to store all session data into a
database (we work in a load balanced environment). We found this to be
the best method of dealing with this because we did not need to deal
with generating unique session id's or identifying when a session has
expired thus reducing code complexity and the DB load.

Carlo Razzeto
Programmer
Mortgage Information Services
Phone: (216) 514-1025 ex. 1212
-----Original Message-----
From: Richard Lynch [mailto:ceo@xxxxxxxxx] 
Sent: Monday, November 14, 2005 3:18 PM
To: Jasper Bryant-Greene
Cc: GamblerZG; php-general@xxxxxxxxxxxxx
Subject: Re:  What is the purpose of sessions extension?

On Fri, November 11, 2005 6:59 pm, Jasper Bryant-Greene wrote:
> GamblerZG wrote:
>> What is the purpose of sessions extension?
>>
>> The reason I ask is because learning to deal with all its functions,
>> ini
>> options and quirks took me _much_ more time than writing pure-php
>> replacement. (That is, without using  session_set_save_handler().)
>
> I realise that yours might be a special case, but for most situations
> I
> have only had to do session_start() and then simply used $_SESSION as
> if
> it were any other array with the simple difference that it persists
> across requests. When done with the session, use session_destroy() if
> you feel the need.
>
> I'm not sure how that could be harder than writing a pure-PHP
> replacement for the session extension...

The FIRST time one uses PHP session_start() et al, it tends to be a
lot of wading through and taking the wrong path and...

Once you figure out that you need:
<?php
  session_start();
?>
at the top of every page, and to just read/write session data with:
$_SESSION
it gets real easy.

But it ain't easy the first time.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Disclaimer: This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux