Title: Cannot change session
Last modified: July 29, 2019

---

# Cannot change session

 *  Resolved [nlbailey89](https://wordpress.org/support/users/nlbailey89/)
 * (@nlbailey89)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cannot-change-session/)
 * At the request of a client we are testing moving a site to Pantheon hosting. 
   In the process we have discovered the needed use of this plugin for sessions.
   We have installed the plugin but seem to have issues. The site is displaying:
 * Warning: session_id(): Cannot change session id when session is active in /srv/
   bindings/6dd16a19c38743349337771a37985223/code/wp-content/plugins/wp-native-php-
   sessions/callbacks.php on line 34
 * From another post in the support section my understanding is that other plugins
   may be initializing the session before this plugin so a mu-plugin needs to be
   created. After doing this though the issue still persists.
 * Sessions are used for a couple different reasons on this site in connection with
   the eCommerce functionality and are required. Any help in either resolving this
   or helping us figure out if this site will even work on the Pantheon setup would
   be appreciated!
 * I can provide needed access information privately.

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

 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-11779448)
 * Hi [@nlbailey89](https://wordpress.org/support/users/nlbailey89/),
 * Could you email me directly? My email address is [listed on my GitHub profile](https://github.com/danielbachhuber/).
   Thanks!
 *  [rodwarrix](https://wordpress.org/support/users/rodwarrix/)
 * (@rodwarrix)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-11905164)
 * I just changed my php version back and it went away but for something different
   for plugin. went from 7.3 back to like 7.2 message gone.
 *  [robotpain](https://wordpress.org/support/users/robotpain/)
 * (@robotpain)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-11989849)
 * I’m hitting the same issue in Pantheon. Added the mu-plugin as recommended, but
   still get the error:
 * Warning: session_id(): Cannot change session id when session is active in /srv/
   bindings/d46130730dab4815abb4f882a0e57dc3/code/wp-content/plugins/wp-native-php-
   sessions/callbacks.php on line 39
 * Any suggestions?
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-11989939)
 * [@robotpain](https://wordpress.org/support/users/robotpain/) I debugged the issue
   yesterday and [realized](https://github.com/pantheon-systems/wp-native-php-sessions/issues/118#issuecomment-537272480)
   there might be some refactoring I need to do.
 * If you want to hide the error for now, you can downgrade to PHP 7.2. I’ll make
   a note to update this thread when the issue is fixed.
 *  [robotpain](https://wordpress.org/support/users/robotpain/)
 * (@robotpain)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-11990019)
 * Great, thank you!
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12008835)
 * [@rodwarrix](https://wordpress.org/support/users/rodwarrix/) [@robotpain](https://wordpress.org/support/users/robotpain/)
   Would either/both of you be willing to [test out 0.9.0-alpha1](https://downloads.wordpress.org/plugin/wp-native-php-sessions.zip)
   on your site, which [fixes the issue](https://github.com/pantheon-systems/wp-native-php-sessions/pull/135),
   to verify everything still works as expected? My tests all pass but it’d be great
   to get some more eyes on it before I tag a release. Thanks 🙂
 *  [Gabriel Ungureanu](https://wordpress.org/support/users/gabiu/)
 * (@gabiu)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12012018)
 * It seems to have worked on my end. I don’t see the warning anymore.
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12012672)
 * [@gabiu](https://wordpress.org/support/users/gabiu/) Thanks for the report! And,
   just to confirm, all of your site functionality that’s dependent on sessions 
   still works as expected?
 *  [robotpain](https://wordpress.org/support/users/robotpain/)
 * (@robotpain)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12013137)
 * Seems to have worked for me. I’ll keep an eye out for any functionality that’s
   affected. Thanks!
 *  Plugin Contributor [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * (@danielbachhuber)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12028319)
 * [@robotpain](https://wordpress.org/support/users/robotpain/) Great, thanks 🙂
   I’ve gone ahead and tagged the v0.9.0 release. Feel free to pop into GitHub if
   you find any bugs to report.

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

The topic ‘Cannot change session’ is closed to new replies.

 * ![](https://ps.w.org/wp-native-php-sessions/assets/icon-256x256.png?rev=3411177)
 * [Native PHP Sessions](https://wordpress.org/plugins/wp-native-php-sessions/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-native-php-sessions/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-native-php-sessions/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-native-php-sessions/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-native-php-sessions/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-native-php-sessions/reviews/)

## Tags

 * [callbacks](https://wordpress.org/support/topic-tag/callbacks/)
 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * 10 replies
 * 5 participants
 * Last reply from: [Daniel Bachhuber](https://wordpress.org/support/users/danielbachhuber/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/cannot-change-session/#post-12028319)
 * Status: resolved