GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — $session->migrate() called before session is started · Issue #7 · stackphp/session

This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

$session->migrate() called before session is started #7

Copy link
Copy link
Open
Open
$session->migrate() called before session is started#7
Copy link

Description

@pascal-hofmann
pascal-hofmann
opened on Sep 6, 2015
Issue body actions

I think there is some kind of conceptual error (at least when session.auto_start=0). I was trying to use Stack\Session and always got an empty session ID.

Reason is, that $session->migrate is called when no cookie is present. This leads to a call to session_regenerate_id (which fails, because no session was started yet). Afterwards NativeSessionStorage::loadSession is invoked, which sets NativeSessionStorage::$started to true.

So in the end I have a broken session (empty session id). I could fix this, by adding a $session->start() before the call to $session->migrate().

Activity

  1. pascal-hofmann commented on Sep 6, 2015

    @pascal-hofmann
    pascal-hofmann
    on Sep 6, 2015
    Author
    More actions

    Is there a reason for the call to $session->migrate()? I think just calling $session->start() should be enough. (Or maybe don't call anything in this case, and let the app start the session if it wants to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.