Executing Code on session timeout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Team 4 Profit

    Executing Code on session timeout

    Hi all,
    is it possible to execute some code on the session timeout event?
    i.e. clear all db information and other stuff when the php session is
    destroyed through the gc_maxlifetime timeout.

    Thanks in advance.


  • Rik

    #2
    Re: Executing Code on session timeout

    On Fri, 02 Mar 2007 20:12:32 +0100, Team 4 Profit <team4profit@gm ail.com>
    wrote:
    Hi all,
    is it possible to execute some code on the session timeout event?
    i.e. clear all db information and other stuff when the php session is
    destroyed through the gc_maxlifetime timeout.
    Create your own session_handler :


    --
    Rik Wasmus

    Comment

    • andrea

      #3
      Re: Executing Code on session timeout

      Create your own session_handler :Thank you very much.
      It is exactly wath I need.

      There is also something like the ASP Application object in PHP?

      Thanks


      Comment

      • Rik

        #4
        Re: Executing Code on session timeout

        andrea <nospam@nospam. comwrote:
        >Create your own session_handler :
        >http://www.php.het/session_set_save_handler
        >>
        >
        Thank you very much.
        It is exactly wath I need.
        >
        There is also something like the ASP Application object in PHP?
        Not a built in one to my knowledge, never really needed one. I usually
        parse some ini-files to constants from outside the root.
        --
        Rik Wasmus
        Posted on Usenet: any site claiming this as original content or me as an
        contributing member is wrong.
        Ask Smart Questions: http://tinyurl.com/anel

        Comment

        • Willem Bogaerts

          #5
          Re: Executing Code on session timeout

          There is also something like the ASP Application object in PHP?

          Not until you write one. Most application or session-related
          functionality is done with functions or superglobals. I usually write an
          application class that features methods for retrieving page parameters
          (with built-in register-globals-correction and the possibility to return
          other types than strings), access to the backend object, and
          application-wide stuff, like user feedback messages and application
          settings.

          Best regards
          --
          Willem Bogaerts

          Application smith
          Kratz B.V.

          Comment

          Working...