GithubHelp home page GithubHelp logo

Comments (5)

chimpmysite avatar chimpmysite commented on May 20, 2024

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.

stefangabos avatar stefangabos commented on May 20, 2024

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.

chimpmysite avatar chimpmysite commented on May 20, 2024

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.

stefangabos avatar stefangabos commented on May 20, 2024

Guys, this is now fixed. Please download latest again.
Thanks for reporting and keeping this thread alive

from zebra_session.

chimpmysite avatar chimpmysite commented on May 20, 2024

Hi @stefangabos,

Will do and thank you for your prompt response :)

from zebra_session.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.