Download the PHP package koded/session without Composer

On this page you can find all versions of the php package koded/session. 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 session

Koded Session

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality Minimum PHP Version

The library relies on the php.ini settings. Every session ini directive can be reset with the Koded\Session\SessionConfiguration object.

Refer to php.ini session directives: http://php.net/manual/en/session.security.ini.php

Usage

The session is started automatically by using one of the 2 methods:

app configuration

or using a SessionMiddleware

include this middleware class in your middleware stack

Session class and function

The session class can be instantiated and used, but the function session() is recommended instead an instance of Session class.

Handlers Configuration

The bare minimum is to define the handler you want to use for the session:

If you do not choose one of the Redis or Memcached, it defaults to files handler which is the PHP's default session mechanism.

However, the files handler might not be desirable if your application runs in Docker, Kubernetes, distributed environment, etc.

The best choice for PHP sessions is Redis in almost all situations.

WARNING: Memcached may drop the session data, because it's nature. Use it with caution!

Redis handler

A typical Redis settings:

To support huge volumes you need a good sysadmin skills and wast knowledge to set the Redis server(s).

Memcached handler

A typical Memcached settings:

To support huge amount of users you need a decent amounts of RAM on your servers. But Memcached is a master technology for this, so you should be fine.

Files handler

This one is not recommended for any serious business. It's fine only for small projects.

All session directives are copied from php.ini.

A typical native PHP session settings:

You cannot use this handler if you've scaled your application, because the session data will most likely be handled randomly on a different instance for every HTTP request.


All versions of session with dependencies

PHP Build Version
Package Version
Requires php Version ~7.3
psr/http-server-middleware Version ~1
koded/cache-simple Version ~2
koded/http Version ~1
ext-json Version *
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 koded/session contains the following files

Loading the files please wait ....