• Resolved ravimallya

    (@ravimallya)


    Hi.

    I’m receiving the following error once I activate the plugin in pantheon.io environment even after enabling php sessions plugin.

    Warning: session_start(): user session functions not defined in /srv/bindings/0d8b2284693d43e7a3f47d4d08fd8ff1/code/wp-content/plugins/buddyforms/BuddyForms.php on line 54 Fatal error: session_start(): Failed to initialize storage module: user (path: ) in /srv/bindings/0d8b2284693d43e7a3f47d4d08fd8ff1/code/wp-content/plugins/buddyforms/BuddyForms.php on line 54

    Please suggest.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sven Lehnert

    (@svenl77)

    Hi @ravimallya,

    strange issue. Please try to restart the server and delete the cash. It looks like you have some unregistered old session conflicting your system.

    Would be intreating to know your php version. session_start() should work just fine.

    Cheers,
    Sven

    Plugin Author Sven Lehnert

    (@svenl77)

    Hi @ravimallya I have added a extra check to the upcoming version and this should prevent this issue.

    ravimallya

    (@ravimallya)

    Okay.

    Thanks.

    pauljmackay

    (@pauljmackay)

    I use Pantheon too. They dont support WP sessions – see https://pantheon.io/docs/wordpress-sessions/ for more info. This plugin is one of the very few I’ve found that breaks even with the “WordPress Native PHP Sessions” plugin enabled in mu-plugins, with the error @ravimallya reports.

    Is there any way to run session_start() later in the plugin init process and also only run it if it is needed? It would be good to avoid starting a session unless loading a page that requires BuddyForms. I’m not totally sure if that would solve the problem running on Pantheon, but I’ve used other plugins on Pantheon that also start sessions successfully, with “WordPress Native PHP Sessions” in place.

    Plugin Author Sven Lehnert

    (@svenl77)

    Hi @pauljmackay

    thanks for the feedback. I have moved the session into the form render function buddyforms_form_html

    https://github.com/BuddyForms/BuddyForms/commit/02aaf4596e73406688b348065258630620853b00

    Please test if the github version works on Pantheon and let me know your result. I like to figure this out and hopefully it is fixed now.

    Cheer,
    Sven

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP: session_start() Error’ is closed to new replies.