Download the PHP package substacks/mongosession without Composer

On this page you can find all versions of the php package substacks/mongosession. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mongosession

Overview

The MongoSession PHP session handler class was built as a drop-in for easily switching to handling sessions using Mongo. It's a great replacement to memcache(d) for VPS servers where you risk memory being reshuffled in the pool and taking performance hits. There are currently inherent risks in using MongoDB as your session handler that you can read about on the documentation page:

http://www.jqueryin.com/projects/mongo-session/

The session handler has recently been updated to perform atomic updates as a quick (although not 100% effective) patch regarding the issue of race conditions caused by issuing AJAX commands. This generally shouldn't be a problem for most sites unless you are performing a series of AJAX requests which modify the same session data fields asynchronously.

Default Usage

If you only have a single server running Mongo on localhost, you can simply load the class and it'll use default config values. There's no need to create the database or collection in advance, as such functionality does not exist in Mongo. If neither the database nor collection exist, they will be created upon the first session insert. Please bare in mind this code should be placed at the top of your files before you make any calls to header():

`

Overriding Default Config Settings

You can override configuration settings in MongoSession by passing in an array with any of the following parameters below. The default is below as a reference.

``

Reason for Active Flag

The reason garbage collection, gc(), updates the active flag and does not delete the entry is that it is intended to be a speed optimization. The theoretical usage of this class is to setup a periodical cronjob to batch delete any sessions that have their active flag set to 0.

A future version of this library will include the cronjob example. For those of you who do not care to implement this, you may remove all references to the active flag entirely in read(), write(), and gc(). Lastly, you will need to update gc() to delete the document:

``

Advanced Usage

If you are currently running multiple Mongo servers (i.e. replica pairs or sharding), there are more advanced configuration options available to you for specifying multiple servers. This functionality has not yet been tested.

Note

If you fork this library and make any substantial updates or bug fixes, please consider sending a push request.

Bitdeli Badge


All versions of mongosession with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package substacks/mongosession contains the following files

Loading the files please wait ....