• dr

    (@daniel_richard)


    Hi Support,

    I’m seeing a lot of errors from easyship plugin every minute.

    Warning: session_start(): Cannot start session when headers already sent …
    plugins/easyship-woocommerce-shipping-rates/easyship.php on line 73

    This is with both cache on and off. Any way to fix this?

    Thanks again!

Viewing 4 replies - 1 through 4 (of 4 total)
  • +1 I’m seeing this as well

    Thread Starter dr

    (@daniel_richard)

    Latest update doesn’t solve this.

    Warning: session_start(): Cannot start session when headers already sent
    plugins/easyship-woocommerce-shipping-rates/easyship.php on line 73

    Occurs on a blank installation with easyship and woocommerce plugins activated.

    Thread Starter dr

    (@daniel_richard)

    I’ve changed:

    line 72:
    if (!session_id())

    to
    if (session_status() == PHP_SESSION_NONE && ! headers_sent())

    Reference:
    https://www.php.net/manual/en/function.session-status.php

    @daniel_richard and @hafizusman,
    After months of no response from the plug-in developer, a plug-in update that made no difference, and no luck getting customer support to put me in touch with the plug-in developers, I believe I have resolved the issue myself. Use at your own risk as I am not the plug-in developer, but this is working for me.

    Go into the following php file: /wp-content/plugins/easyship-woocommerce-shipping-rates/easyship.php

    Find Lines 67-74:

    
                /**
                 *  Register a session
                 */
                public function register_session()
                {
                    if (session_status() == PHP_SESSION_NONE && !headers_sent())
                        session_start();
                }
    

    And replace lines 67-74 with the following:

    
                /**
                 *  Register a session
                 */
                public function register_session()
                {
                    if (session_status() == PHP_SESSION_NONE && !headers_sent()) {
    	                session_start();
    	                session_write_close();
                    }
                }
    

    Run Site Health test and the errors should all be gone.

    • This reply was modified 4 years, 6 months ago by forgetme.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning: session_start()’ is closed to new replies.