Home     |     Java    |     Php General    |     Oracle Database    |     Oracle Server  

MS Dynamics CRM 3.0

  •  Setting up and Configuring Microsoft Dynamics CRM 3.0
  •  Managing Security and Information Access
  •  Entity Customization: Concepts and Attributes
  •  Entity Customization: Forms and Views
  •  Entity Customization: Relationships, Custom Entities, and Site Map
  •  Reporting and Analysis
  •  Workflow
  •  Server-Side SDK
  •  Client-Side SDK
  •  Integration with External Applications
  • Cervo Technologies
    The Right Source to Outsource

    Sharepoint Portal Server KB

    Microsoft CRM Info

    WPF Interview Questions

    SilverLight Interview Qs

    Asp.Net 2.0 Interview Qs

    Asp.NET 1.1 FAQs

    Oracle Interview Questions

    SAP Interview Questions

    PHP Programming

    session destroy callback (onSessionDestroy event)


    Hi,

    I need to do some clean-up when the session is destroyed or values are
    removed from it (expired).

    using session_set_save_handler does not work for me, as I don't want to
    rewrite session handling, I just need to be notified when a value is
    destroyed.

    Regards,
    Emil Ivanov

    P.S. I'm dealing with temporary pictures, saved on the disk and their path
    stored into the session and I need to delete them when they are no longer
    needed.

    On May 13, 1:51 pm, emil.vla@gmail.com ("Emil Ivanov") wrote:

    > Hi,

    > I need to do some clean-up when the session is destroyed or values are
    > removed from it (expired).

    > using session_set_save_handler does not work for me, as I don't want to
    > rewrite session handling, I just need to be notified when a value is
    > destroyed.

    > Regards,
    > Emil Ivanov

    > P.S. I'm dealing with temporary pictures, saved on the disk and their path
    > stored into the session and I need to delete them when they are no longer
    > needed.

    You are probably better off using session_set_save_handler() anyway.
    There is a security risk if you don't have the PHP setting for the
    save path of sessions changed and you are on shared hosting (anyone
    can access the temporary directory). You can easily rewrite the code
    to save the session data in files, it's serialized anyway.

    If you really prefer, you can save the session file IDs in a database
    and check (with a cron job) if that session file still exists in /tmp/
    or your temporary directory.

    -Mike PII

    Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc