Sessions. Argh.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • The Plankmeister

    Sessions. Argh.

    Hi...

    I'm trying my hardest to understand fully how sessions work and how best to
    use them. However, all I can find is information that doesn't tell me
    anything other than that sessions store information between pages, which I
    knew already. I want to know HOW sessions work! If anybody has any good
    links to material that explains sessions fully, then please send those links
    this way!

    I'm particularly interested in the session_set_sav e_handler() function, and
    an in depth explanation of how PHP uses the provided functions. The PHP
    manual does little to explain this. My problems are coming from trying to
    impliment a session handling class, and for the life of me I cannot figure
    out why and where the calls to my defined open, close, read, write, destroy
    and gc functions are coming from!

    Am I right in assuming that after I've used the session_set_sav e_handler()
    function and provided it with the 6 functions it needs, all I need to then
    do is use $_SESSION variables normally? For instance, if after I've called
    session_set_sav e_handler() and I do this:

    $_SESSION['required_info'] = "Sessions in PHP. Argh!";

    then my custom functions will be called by PHP? Or have I totally
    misunderstood everything?

    P.

    p.s. I am calling session_set_sav e_handler() with the appropriate
    parameters, I just left them out for ease of reading.


  • The Plankmeister

    #2
    Re: Sessions. Argh.

    After much hacking and loss of hair, I have cracked it. The problem I was
    having was with the difference between certain mysql_* functions and their
    odbc_* "equivalent s"

    But I would still like to know any links to useful documentation about
    sessions and security using sessions.

    P.

    "The Plankmeister" <plankmeister_N OSPAM_@hotmail. com> wrote in message
    news:3f619c64$0 $13169$edfadb0f @dread15.news.t ele.dk...[color=blue]
    > Hi...
    >
    > I'm trying my hardest to understand fully how sessions work and how best[/color]
    to[color=blue]
    > use them. However, all I can find is information that doesn't tell me
    > anything other than that sessions store information between pages, which I
    > knew already. I want to know HOW sessions work! If anybody has any good
    > links to material that explains sessions fully, then please send those[/color]
    links[color=blue]
    > this way!
    >
    > I'm particularly interested in the session_set_sav e_handler() function,[/color]
    and[color=blue]
    > an in depth explanation of how PHP uses the provided functions. The PHP
    > manual does little to explain this. My problems are coming from trying to
    > impliment a session handling class, and for the life of me I cannot figure
    > out why and where the calls to my defined open, close, read, write,[/color]
    destroy[color=blue]
    > and gc functions are coming from!
    >
    > Am I right in assuming that after I've used the session_set_sav e_handler()
    > function and provided it with the 6 functions it needs, all I need to then
    > do is use $_SESSION variables normally? For instance, if after I've called
    > session_set_sav e_handler() and I do this:
    >
    > $_SESSION['required_info'] = "Sessions in PHP. Argh!";
    >
    > then my custom functions will be called by PHP? Or have I totally
    > misunderstood everything?
    >
    > P.
    >
    > p.s. I am calling session_set_sav e_handler() with the appropriate
    > parameters, I just left them out for ease of reading.
    >
    >[/color]


    Comment

    • system crash

      #3
      Re: Sessions. Argh.

      On Fri, 12 Sep 2003 15:35:01 +0200, The Plankmeister wrote:
      [color=blue]
      > After much hacking and loss of hair, I have cracked it. The problem I was
      > having was with the difference between certain mysql_* functions and their
      > odbc_* "equivalent s"
      >
      > But I would still like to know any links to useful documentation about
      > sessions and security using sessions.
      >
      > P.
      >
      > "The Plankmeister" <plankmeister_N OSPAM_@hotmail. com> wrote in message
      > news:3f619c64$0 $13169$edfadb0f @dread15.news.t ele.dk...[color=green]
      >> Hi...
      >>
      >> I'm trying my hardest to understand fully how sessions work and how best[/color]
      > to[color=green]
      >> use them. However, all I can find is information that doesn't tell me
      >> anything other than that sessions store information between pages, which I
      >> knew already. I want to know HOW sessions work! If anybody has any good
      >> links to material that explains sessions fully, then please send those[/color]
      > links[color=green]
      >> this way!
      >>
      >> I'm particularly interested in the session_set_sav e_handler() function,[/color]
      > and[color=green]
      >> an in depth explanation of how PHP uses the provided functions. The PHP
      >> manual does little to explain this. My problems are coming from trying to
      >> impliment a session handling class, and for the life of me I cannot figure
      >> out why and where the calls to my defined open, close, read, write,[/color]
      > destroy[color=green]
      >> and gc functions are coming from!
      >>
      >> Am I right in assuming that after I've used the session_set_sav e_handler()
      >> function and provided it with the 6 functions it needs, all I need to then
      >> do is use $_SESSION variables normally? For instance, if after I've called
      >> session_set_sav e_handler() and I do this:
      >>
      >> $_SESSION['required_info'] = "Sessions in PHP. Argh!";
      >>
      >> then my custom functions will be called by PHP? Or have I totally
      >> misunderstood everything?
      >>
      >> P.
      >>
      >> p.s. I am calling session_set_sav e_handler() with the appropriate
      >> parameters, I just left them out for ease of reading.
      >>
      >>[/color][/color]

      Actually I'm a little suprised you didn't find much help in the Manual. I
      keep a 'one page' html copy so I can search the entire document for
      whatever is giving me fits. I just searched for 'session management'
      about two days ago and found the info quite elaborate and helpful.. In
      fact, I got a LOT more info than I needed.. but better too much than that
      nagging feeling of 'not enough'.. :-(

      Glad you found your answers..

      Mike
      Houston, Tx
      ............... ......

      Comment

      Working...