Thread Starter
dr
(@daniel_richard)
Error still persists. Is there any chance that this could be resolved?
Warning: session_start(): Cannot start session when headers already sent in /public_html/wp-content/plugins/easyship-woocommerce-shipping-rates/easyship.php on line 73
+1 I’m seeing this on my site as well.
Thread Starter
dr
(@daniel_richard)
Latest update still doesn’t resolve this issue. 🙁
I am also getting the error “[21-May-2020 19:36:53 UTC] PHP Warning: session_start(): Cannot start session when headers already sent in /public_html/wp-content/plugins/easyship-woocommerce-shipping-rates/easyship.php on line 73”
Can the plugin author update with a fix perhaps?
Thank you.
@daniel_richard and @kadolf1024,
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.