• The plugin causes 1 critical issue:
    A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.

    I had to disable the plugin.

    Version 1.1.9

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @olessol ,

    It could be a conflict with another plugin or even with the theme. Could you please try to re-activate the Premmerce plugin, and proceed in deactivating the other plugins on your site and see if the issue will persist.

    Please feel free to let us know how it goes and I’ll be glad to further assist you with this.

    I have the same issue.

    A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.

    I disabled all plugins (except WooCommerce and Premmerce Wholesale Pricing for WooCommerce) and have changed theme to default. The error still here.

    I solve the issue. You need change

    if ( !session_id() ) {
    session_start();
    }

    to

    if ( !session_id() ) {
    session_start( [
    ‘read_and_close’ => true,
    ] );
    }

    in admin.php

    Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @sxmotive ,

    Thank you very much for providing this solution ??

    I’ll be sure to forward this to our developers.

    Have a great day ahead!

    Thread Starter olessol

    (@olessol)

    After change

    if ( !session_id() ) {
    session_start();
    }

    to

    if ( !session_id() ) {
    session_start( [
    ‘read_and_close’ => true,
    ] );
    }

    in admin.php`

    ERROR

    Constant ‘read_and_close’ – assumed ‘‘read_and_close’’ (this will throw an Error in a future version of PHP) in public_html/wp-content/plugins/premmerce-woocommerce-wholesale-pricing/src/Admin/Admin.php on line 46

    Warning: session_start(): Setting option ‘‘read_and_close’’ failed in
    public_html/wp-content/plugins/premmerce-woocommerce-wholesale-pricing/src/Admin/Admin.php on line 46

    Thread Starter olessol

    (@olessol)

    May be

    if ( !session_id() ) {
    session_start([‘read_and_close’ => true]);
    }

    Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @olessol ,

    Our developers will be checking this and we’ll be sure to get back to you with the most viable solution on this.

    Cheers,

    Same problem – active PHP session was detected. PHP-FPM 8.1. WooCommerce: 6.7.0

    Plugin Support Mark Kevin

    (@mkesteban08)

    Hi @radchuk2012 ,

    The team is still investigating this and actively working on not using the $_Session to handle messages.

    I hope for your kind understanding regarding this. Have a nice day ahead!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Plugin causing Site Health Errors: An active PHP session was detected’ is closed to new replies.