Comments (5)
Hi @stefangabos,
I agree with @switchroyale after upgrading to PHP8.
I use both Zebra_Database and Zebra_Session in my CMS software, both fantastic PHP classes. Unfortunately after upgrading to PHP8 my sessions expire immediately. I've spent a whole day debugging my code only to find that out. Previous versions on PHP7 worked fine!
$session = new Zebra_Session($link, 'sEcUr1tY_c0dE');
I'm looking at your code but can't find what's wrong. Default value is 0 if not specified. Gonna try a value.
from zebra_session.
I can't find anything related to this and I am almost certain that I have it somewhere running on PHP 8
it is maybe some setting in you php.ini used for PHP 8 that impacts this somehow
i'll keep digging but feedback is appreaciated
from zebra_session.
Hi @stefangabos,
So I can confirm that making a change to the session lifetime in your Zebra_Session class appears to fix my issue within PHP 8.1.
PHP 7.4 works ok with 0 (zero), however PHP 8.1 definitely expires sessions immediately with 0.
Here are my working PHP 8.1 settings...
$session = new Zebra_Session(
$link, // Database Connection
'sEcUr1tY_c0dE', // 2nd var is a random security code and part of a hash to preventing session hijacking
1440, // Session Lifetime
true, // Lock to User Agent
false, // Lock to IP
60, // Lock Timeout
DB_PREFIX.'_sessions', // Table Name
true, // Start Session
false // Read Only
);
I've done extensive research into this issue but can't find a solution when allowing default session lifetime of zero.
from zebra_session.
Guys, this is now fixed. Please download latest again.
Thanks for reporting and keeping this thread alive
from zebra_session.
Hi @stefangabos,
Will do and thank you for your prompt response :)
from zebra_session.
Related Issues (20)
- Prepare statements a must!
- HUGE number of session rows HOT 2
- request: anti-dos
- Support on postgresql
- explanation request HOT 1
- session data missing after renew session in database HOT 1
- this session class can be deleted! HOT 26
- Empty Session HOT 13
- Are there any reason you don't use SessionHandlerInterface class? HOT 1
- Can't connect Zebra Session with PDO? HOT 7
- transition to PDO ? HOT 11
- If calling die(), will the session get closed/lock get released or not? HOT 2
- Question: session_id($id) does not change sid HOT 1
- get_lock doesn't work HOT 3
- Logging Out Users HOT 6
- keep session even if browser is close HOT 1
- How to show alert when session is expired? HOT 14
- zebra_session could be use in AWS ALB? HOT 2
- session_start gives an unkown error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zebra_session.