Support » Plugin: WordPress Native PHP Sessions » Cannot change session

  • Resolved nlbailey89

    (@nlbailey89)


    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 Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @nlbailey89,

    Could you email me directly? My email address is listed on my GitHub profile. Thanks!

    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.

    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 Author Daniel Bachhuber

    (@danielbachhuber)

    @robotpain I debugged the issue yesterday and realized 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.

    Great, thank you!

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    @rodwarrix @robotpain Would either/both of you be willing to test out 0.9.0-alpha1 on your site, which fixes the issue, 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 🙂

    gabiu

    (@gabiu)

    It seems to have worked on my end. I don’t see the warning anymore.

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    @gabiu Thanks for the report! And, just to confirm, all of your site functionality that’s dependent on sessions still works as expected?

    robotpain

    (@robotpain)

    Seems to have worked for me. I’ll keep an eye out for any functionality that’s affected. Thanks!

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    @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)
  • You must be logged in to reply to this topic.