PHP Sessions Management Class 1.0.3 review

Download
by rbytes.net on

PHP Sessions Management Class is a php class to handle sessions by using a mySQL database for session related data storage providing

License: Free for non-commercial use
File size: 24K
Developer: Stefan Gabos
0 stars award from rbytes.net

PHP Sessions Management Class is a php class to handle sessions by using a mySQL database for session related data storage providing better security then the default session handler used by PHP.

If you are not familiar with what php sessions are and what are they good for, check out the dedicated chapter in the php manual

If you are familiar with php sessions and you want to use this php class in your projects then remember that to prevent session hijacking, you must not forget to use the regenerate_id() method whenever you do a privilege change in your application

Before usage, make sure you use the session_data.sql file (which is a sql dump file generated with phpMyAdmin) from the install_sql folder to set up the table used by the class

You don't need to modify anything in your previous applications: after instantiating the php class, just use sessions as you would normally.

Note:

The class assumes that there is an active connection to a mySQL database and it does not attempt to create one. This is due to the fact that, usually, there is a config file that holds the database connection related information and another class, or function that handles database connection. If this is not how you do it, you can easily adapt the code by putting the database connection related code in the "open" method of the class.

What's New in This Release:
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.

PHP Sessions Management Class 1.0.3 keywords