Title: session_value is empty
Last modified: December 1, 2017

---

# session_value is empty

 *  Resolved [Mikhail Alferov](https://wordpress.org/support/users/malferov/)
 * (@malferov)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/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 🙁
    -  This topic was modified 8 years, 5 months ago by [Mikhail Alferov](https://wordpress.org/support/users/malferov/).
    -  This topic was modified 8 years, 5 months ago by [Mikhail Alferov](https://wordpress.org/support/users/malferov/).
    -  This topic was modified 8 years, 5 months ago by [Mikhail Alferov](https://wordpress.org/support/users/malferov/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [spassoart](https://wordpress.org/support/users/spassoart/)
 * (@spassoart)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9748516)
 * Same thing here! Everything was running smooth til upgrade.
    Had to downgrade
   to v1.22
 *  Thread Starter [Mikhail Alferov](https://wordpress.org/support/users/malferov/)
 * (@malferov)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9751354)
 * In v. 2.0.1 custom values are saved in ‘session_value’ column! Thank you!
 *  Plugin Author [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9874691)
 * 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.
 *  Thread Starter [Mikhail Alferov](https://wordpress.org/support/users/malferov/)
 * (@malferov)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9875339)
 * 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.
    -  This reply was modified 8 years, 4 months ago by [Mikhail Alferov](https://wordpress.org/support/users/malferov/).
 *  Plugin Author [Eric Mann](https://wordpress.org/support/users/ericmann/)
 * (@ericmann)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9875725)
 * 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.
 *  Thread Starter [Mikhail Alferov](https://wordpress.org/support/users/malferov/)
 * (@malferov)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9876298)
 * 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!
    -  This reply was modified 8 years, 4 months ago by [Mikhail Alferov](https://wordpress.org/support/users/malferov/).

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘session_value is empty’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-session-manager_272e38.svg)
 * [WP Session Manager](https://wordpress.org/plugins/wp-session-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-session-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-session-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-session-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-session-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-session-manager/reviews/)

## Tags

 * [cookie](https://wordpress.org/support/topic-tag/cookie/)
 * [cookies](https://wordpress.org/support/topic-tag/cookies/)
 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * 6 replies
 * 3 participants
 * Last reply from: [Mikhail Alferov](https://wordpress.org/support/users/malferov/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/session_value-is-empty/#post-9876298)
 * Status: resolved