Release Notes: This release fixes a bug which made sessions' lifetimes twice as long as expected, adds details on how to preserve session data across subdomains to the documentation, and makes the messages related to database connection errors more meaningful.
Release Notes: The constructor method now accepts an optional link argument which must be a MySQL link identifier. By default, the library made use of the last link opened by mysql_connect(). On some environments (particularly on shared hosting) the "last link opened by mysql_connect" was not available at the time of the instantiation of the Zebra_Session library. For these cases, supplying the MySQL link identifier to the constructor method will fix things. The documentation was corrected and expanded.
Release Notes: This release implements session locking, a way to ensure that data is correctly handled in a scenario with multiple concurrent AJAX requests.
Release Notes: This release fixes a small bug in the destroy method: the script would trigger a PHP notice if the HTTP_USER_AGENT value was not available in the $_SERVER super-global. It adds a new method “get_settings” that returns the default session-related settings for the environment where the class is used. The class will now trigger a fatal error if a database connection is not available. The class will now report if MySQL table is not available. The constructor of the class now accepts a new argument, tableName; with this, the MySQL table used by the class can be changed.
Release Notes: 'LIMIT 1' has been added to the read() method, increasing the performance of the script.
Release Notes: 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.
Release Notes: 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.
Release Notes: 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.
Release Notes: 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.