Giter VIP home page Giter VIP logo

Comments (6)

ezimuel avatar ezimuel commented on June 16, 2024

@GM3Z I found error session_start(): Failed to decode session object. Session has been destroyed mentioned here on stackoverflow.
Are you using file to store the session data? If you changed the session.save_path this must be an absolute path. Moreover, the path that you specify must have read and write permissions by PHP.

from php-secure-session.

SuprAltCtrl avatar SuprAltCtrl commented on June 16, 2024

Hello @ezimuel

Yes, I store the session data in a file also I changed the path in the php.ini file, this value is session.save_path = "/var/www/sessions"

I read the link that you posted and I try to solve the problem.

from php-secure-session.

ezimuel avatar ezimuel commented on June 16, 2024

I do not recommend to store the session data in /var/www since this folder is usually exposed by webserver such as Apache or nginx. I suggest to use a different folder. Moreover, be sure that PHP has privileges to write and read on this folder. For instance, PHP runs with user www-dataon GNU/Linux using nginx.

from php-secure-session.

SuprAltCtrl avatar SuprAltCtrl commented on June 16, 2024

I checked the permissions and they're correct. Thank you for your suggestion but I can't change the folder because I have a restriction with open_base_dir. Sometimes the KEY value in the cookie dissapear.

from php-secure-session.

ezimuel avatar ezimuel commented on June 16, 2024

OK, just another check can you try to specify the folder session.save_path = "/tmp"? The /tmp folder is a special folder in Linux that everyone can use it. It's just a test since it's not recommended for security reason to use it. If this works fine means it's a problem of the folder /var/www/sessions.

from php-secure-session.

SuprAltCtrl avatar SuprAltCtrl commented on June 16, 2024

Thank for the information. If I have another question, I will open a new issue.

from php-secure-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.