Download the PHP package abbadon1334/atk4-session without Composer

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

ATK4 Session Handler

License Maintainability Maintainability Technical Debt Test Coverage PHP version

Session handler for Atk4\Data (@see https://github.com/atk4/data)

Install

composer require abbadon1334/atk4-session

Initialize without atk4\ui

Create session table using atk4\schema

OR

Create session table with SQL query

Session GC

if you use InnoDB deletes are slow, so the best option for huge request application is to set a cronjob which run every 2 minutes, you can find an example in : demos/example/cronjob.example.php. When you instantiate the SessionHandler, if you use the crojob, set the gc_probability option to 0 to disable automatic triggering of gc.

Why i need to replace the default PHP Session Handler with this?

Because of file locking ( here a good article about the argument link)

Every call that use sessions read a file and set a lock on it until release or output, to prevent race conditions.

It's clearly a shame to have file locking on things that are usually static, like nowadays sessions.

Using an alternative you'll have for sure race conditions, BUT what race condition can be if you, usually, have only an ID in $_SESSION and that is nearly immutable from login to logout.

SessionHandler will substitute SessionHandler class in PHP and will store session data in database using atk4\data instead of using files.

In atk4\ui where async calls are massively used, this problem is much more evident.

You can add it without breaking your project, it already works, but is still in development and need a strong review for security issue.


All versions of atk4-session with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4 <8.2
ext-pdo Version *
atk4/data Version ~3.1.0
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 abbadon1334/atk4-session contains the following files

Loading the files please wait ....