PHP Sessions Management Class

PHP Sessions Management Class implements a new PHP session handler that can replace the default PHP session handler by storing session data in a MySQL database table. The session handler works just by creating an object of this class. After that, applications just need to use the same code to store and retrieve session variables.

Tags Software Development Libraries php classes
Operating Systems OS Independent
Implementation PHP

Tweet this project Short link

Rss Recent releases

  • Rrelease-mid
  •  17 Sep 2007 10:49
  • Rrelease-after

Changes: 'LIMIT 1' has been added to the read() method, increasing the performance of the script.

  • Rrelease-mid
  •  27 Aug 2007 07:23
  • Rrelease-after

Changes: The write method was rewritten; it previously had to run two queries each time and now only runs a single one (which uses ON DUPLICATE KEY UPDATE). The type of the http_user_agent field in the database table has been changed from TEXT to VARCHAR(32) as it's now MD5 hashed. This should increase the performance of the script. The constructor of the class now accepts a new argument "securityCode" in order to try to prevent HTTP_USER_AGENT spoofing.

  • Rrelease-mid
  •  15 Dec 2006 02:05
  • Rrelease-after

    Changes: The get_users_online() method is now more accurate as it now runs the garbage collector before getting the number of online users. The structure of the MySQL table used by the class was tweaked in so that the "http_user_agent" field was changed from VARCHAR(255) to TEXT to accomodate user agent strings that are longer than 255 characters. The "session_data" field was also changed from TEXT to BLOB to help users who store a large amount of data in sessions.

    • Rrelease-mid
    •  22 Nov 2006 01:44
    • Rrelease-after

    Changes: The class was trying to store the session data without processing it with mysql_real_escape_string. Therefore, whenever you had quotes in your data, nothing got saved. This problem has been fixed.

    • Rrelease-mid
    •  12 Sep 2006 01:05
    • Rrelease-after

    Changes: In the 'session_data' table, the 'session_id' field is now a primary key and its type was changed from varchar(255) to varchar(32). Previously, a whole table scan was performed every time a session was loaded. A new "stop()" method that unsets a session's variables and deletes it from the database was added due to the fact that some people were using the private "destroy" method, which is not for this purpose. You can now override the default settings of the session.gc_maxlifetime, session.gc_probability, and session.gc_divisor configuration options. An example file was added.

    Aadada849df16090dcbf0b42681a01f0_thumb

    Project Spotlight

    XML parser class

    Generic PHP XML parser clas

    No-screenshot

    Project Spotlight

    SQLyog

    A GUI tool that allows you manage MySQL databases.