Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Location
    France
    Posts
    549
    Plugin Contributions
    8

    Default How to detect when the session has expired so i can run a clean up script

    Hi,

    Is there a built in function that i can use to trigger a php script to run when a session id has expired?

    I'm temporarily writing information to a database and using $_SESSION['securityToken']; to ensure this data is only viewed by that session user. However, over time, this table will get bloated. I want to run a script to delete all data for the given session id once the time has expired.

    Thanks

  2. #2
    Join Date
    Nov 2005
    Location
    France
    Posts
    549
    Plugin Contributions
    8

    Default Re: How to detect when the session has expired so i can run a clean up script

    Nobody got any ideas on this? Any info from the dev team?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: How to detect when the session has expired so i can run a clean up script

    Simple: add another field to your database table, such as 'expires_time' and store in it a timestamp that's for 30-90 minutes from whenever you insert it, and write code to clean up any entries that are older than that time.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Nov 2005
    Location
    France
    Posts
    549
    Plugin Contributions
    8

    Default Re: How to detect when the session has expired so i can run a clean up script

    That's what i'd thought of doing as my 'work around'.

    I thought maybe there was a specific function within zc core to know when a session had expired.

    Thanks Dr Byte. Always useful answers to obscure questions :)

 

 

Similar Threads

  1. Replies: 3
    Last Post: 8 Jun 2015, 09:08 PM
  2. v153 When try to create new client: Whoops! Your session has expired.
    By etapavirtual in forum General Questions
    Replies: 16
    Last Post: 17 Dec 2014, 09:24 PM
  3. "session has expired" - clean installation on AMPPS
    By lausianne in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 3 Jun 2014, 06:32 PM
  4. v151 Whoops Your Session Has Expired when using eProcessing Network SIM emulator
    By firstcapitalfirearms in forum General Questions
    Replies: 0
    Last Post: 22 Feb 2013, 07:23 PM
  5. "your session has expired" when adding to cart
    By articleck in forum Basic Configuration
    Replies: 6
    Last Post: 13 Nov 2011, 04:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR