2017 © Pedro Peláez
 

library zebra-session-loader

This library automatically starts Zebra sessions (database powered sessions) wherever vendor/autoload.php is included. It can be useful if you need to add database powered sessions to a bespoke PHP application that lacks an existing framework.

image

rapidwebltd/zebra-session-loader

This library automatically starts Zebra sessions (database powered sessions) wherever vendor/autoload.php is included. It can be useful if you need to add database powered sessions to a bespoke PHP application that lacks an existing framework.

  • Tuesday, January 30, 2018
  • by DivineOmega
  • Repository
  • 4 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 46 % Grown

The README.md

Zebra Session Loader

This library automatically starts Zebra sessions (database powered sessions) wherever vendor/autoload.php is included. It can be useful if you need to add database powered sessions to a bespoke PHP application that lacks an existing framework., (*1)

Installation

  1. Run composer require rapidwebltd/zebra-session-loader., (*2)

  2. Create a session_data table in your MySQL database to hold session data. You can use the SQL below to do this., (*3)

CREATE TABLE `session_data` (
  `session_id` varchar(32) NOT NULL default '',
  `hash` varchar(32) NOT NULL default '',
  `session_data` blob NOT NULL,
  `session_expire` int(11) NOT NULL default '0',
  PRIMARY KEY  (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Configuration

Add the following to your .env file, changing the database connection details to point at the database containing your session_data table., (*4)

You should also ensure the security code is changed to a random string., (*5)

ZEBRA_SESSION_SECURITY_CODE=random_string_of_chars_og4bf42kh07odgh20gjwe
ZEBRA_SESSION_DATABASE_CONNECTION_NAME=main

DCOM_MAIN_OBJECT_TYPE=mysqli    # Must be a mysqli object
DCOM_MAIN_DATABASE_TYPE=mysql

DCOM_MAIN_DATABASE_HOST=localhost
DCOM_MAIN_DATABASE_USERNAME=root
DCOM_MAIN_DATABASE_PASSWORD=password
DCOM_MAIN_DATABASE_NAME=dbname

Now any page that includes vendor/autoload.php will automatically use database powered sessions, provided by Zebra sessions., (*6)

The Versions

30/01 2018

dev-master

9999999-dev

This library automatically starts Zebra sessions (database powered sessions) wherever vendor/autoload.php is included. It can be useful if you need to add database powered sessions to a bespoke PHP application that lacks an existing framework.

  Sources   Download

LGPL3 LGPL-3.0-only

The Requires

 

by Jordan Hall

30/01 2018

v1.0.1

1.0.1.0

This library automatically starts Zebra sessions (database powered sessions) wherever vendor/autoload.php is included. It can be useful if you need to add database powered sessions to a bespoke PHP application that lacks an existing framework.

  Sources   Download

LGPL-3.0-only

The Requires

 

by Jordan Hall

10/10 2017

v1.0.0

1.0.0.0

Automatically start Zebra sessions (database powered sessions)

  Sources   Download

LGPL3

The Requires

 

by Jordan Hall