PHP Classes

File: Env.session.example.md

Recommend this page to a friend!
  Packages of Ramesh Narayan Jangid (Sharma)   Open Swoole Microservices   Env.session.example.md   Download  
File: Env.session.example.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change: refactor
refactor
refactor
Date: 10 days ago
Size: 2,208 bytes
 

Contents

Class file image Download

PHP Session

Collection of Mostly used Session Handlers

  • Supports File / MySql / PostgreSql / MongoDb / Redis / Memcached / Cookie based Session Handlers
  • Supports Readonly mode as well for all the above mentioned Session Handlers

PHP Session related configs

sessionName='PHPSESSID' ; Default
sessionMaxLifetime=3600
sessionSavePath='sessions'

Encrypting PHP Session data settings

; Value=base64_encode(openssl_random_pseudo_bytes(32))
ENCRYPTION_PASS_PHRASE='H7OO2m3qe9pHyAHFiERlYJKnlTMtCJs9ZbGphX9NO/c='

; Value=base64_encode(openssl_random_pseudo_bytes(16))
ENCRYPTION_IV='HnPG5az9Xaxam9G9tMuRaw=='

MySQL based PHP Session related configs

; MySQL
mySqlServerHostname='localhost'
mySqlServerPort=3306
mySqlServerUsername='root'
mySqlServerPassword='shames11'
mySqlServerDatabase='session_db'
mySqlServerTable='sessions'

PostgreSQL based PHP Session related configs

; PostgreSQL
pgSqlServerHostname='localhost'
pgSqlServerPort=5432
pgSqlServerUsername=''
pgSqlServerPassword=''
pgSqlServerDatabase='session_db'
pgSqlServerTable='sessions'

MongoDB based PHP Session related configs

; MongoDB
mongoDbServerHostname='localhost'
mongoDbServerPort=27017
mongoDbServerUsername=''
mongoDbServerPassword=''
mongoDbServerDatabase='session_db'
mongoDbServerCollection='sessions'

Redis based PHP Session related configs

; Redis
redisServerHostname='localhost'
redisServerPort=6379
redisServerUsername=''
redisServerPassword=''
redisServerDatabase=0;

Memcached based PHP Session related configs

; Memcached
memcachedServerHostname='localhost'
memcachedServerPort=11211

Cookie based PHP Session related configs

; Cookie
sessionDataName='PHPSESSDATA'   ; For sessionMode Cookie

Contributing

Issues and feature request are welcome.<br /> Feel free to share them on issues page

Author

  • Ramesh N. Jangid (Sharma)

Github: @polygoncoin

License

Copyright © 2026 Ramesh N. Jangid (Sharma).<br /> This project is MIT licensed.