Support » Plugin: WP Session Manager » session_value is empty

  • Hi! After updating the plugin to version 2.0.0 in table ‘sm_sessions’ column ‘session_value’ remains empty and custom values are not saved.

    $wp_session = WP_Session::get_instance();
    $wp_session['test'] = 'test';
    var_dump($wp_session);

    object(WP_Session)#3835 (5) { [“session_id”]=> string(32) “b3f2d84fd3138c1927abac4cdb3ec018” [“expires”:protected]=> int(1512120166) [“exp_variant”:protected]=> int(1512119806) [“container”:protected]=> array(1) { [“test”]=> string(4) “test” } [“dirty”:protected]=> bool(true) }

    But ‘session_value’ for session_key ‘b3f2d84fd3138c1927abac4cdb3ec018’ in table is empty 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same thing here! Everything was running smooth til upgrade.
    Had to downgrade to v1.22

    In v. 2.0.1 custom values are saved in ‘session_value’ column! Thank you!

    Plugin Author Eric Mann

    (@ericmann)

    There was a bug in the community patch that introduced table storage in v2.0.0. That was resolved in v2.0.1 and should no longer be an issue in that or any later version. Please advise if that is not the case.

    Eric, I did not check on table after installing version 3.0.1 and 3.0.2, but with these updates section of the site “You recently watched” stopped working (WP_Session object probably was not stored ID of viewed posts). Fell back to 2.0.2 — in this version everything works fine.

    Plugin Author Eric Mann

    (@ericmann)

    Version 2 stored data in the database a bit differently than version 3. In addition, version 2 used the old _wp_session cookie to identify a session whereas version 3 uses the standard PHPSESSID cookie.

    In version 2, a serialized array of data is printed into the database. It’s then deserialized when it comes back out and pushed into the state container of the WP_Session object.

    Version 3 uses native sessions, which use a <i>different</i> and incompatible serialization format. Upgrading to version 3 will render existing sessions inoperable.

    The reason this was a 3.X release instead of a 2.1 release was because of this breakage. Upgrading across major versions will flush data.

    Updated the plugin to version 3.0.2. Deleted all cookies of the site. Opened a few items on sale and… it works! Information about recently viewed products are stored in the WP_Session object. Thank You, Eric!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘session_value is empty’ is closed to new replies.