• Resolved richsadams

    (@richsadams)


    Hi Edward

    I just installed your great plugin and configured it based on your excellent tutorial. It works well!

    I have run into an issue however. The plugin apparently calls for a PHP session but does not close it. In my “Site Health” monitor I am getting the following warning:

    =-=-=-=-=-=-=-=
    An active PHP session was detected

    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.
    =-=-=-=-=-=-=-=

    When I deactivate your plugin the message disappears.

    I did find one file that had a session open with no closing:

    classes/mail_integration_365/core.php
    Line:38

    // Start session to store authentication details
    if (!isset($_SESSION)) {
    session_start();
    }

    The plugin is v1.1.0
    WP v5.6

    Can you please assist me with this?

    TIA~

    • This topic was modified 3 years, 11 months ago by richsadams.
    • This topic was modified 3 years, 11 months ago by richsadams.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Rich, having just Googled this I think I know what the issue is. It seems to be linked to the latest version of WordPress. I’ll see if I can issue a fix today.

    Hi Rich, I’ve just uploaded version 1.2.0 which should have resolved this issue. I’ve also added file attachment support for files <3MB in size.

    Thread Starter richsadams

    (@richsadams)

    Hi Edward,

    Thank you so much for the fast response!

    v1.2.0 did indeed resolve the issue. All is right with the world again. ??

    Thank you again and keep up the great work.

    Best wishes,

    Rich

    Thanks Rich, great to hear it’s resolved the issue for you!

    All the best,

    Ed

    Thread Starter richsadams

    (@richsadams)

    Hi Edward,

    Since updating to v1.2.0 the plugin seems to no longer be working. Emails are no longer being generated by the site via the Office 365 account when an order is placed I keep seeing this error on the plugin’s page:

    “Invalid OAuth State”

    Would you be so kind as to let me know what needs to be done?

    Thank you very much.

    Rich

    Hi Rich, sounds like the access token has expired so it’s using the refresh token to get a new one which involves a so called state variable. The simplest fix would be to you re-authenticate to get a new access token (this is step 8 in my guide).

    This is a little odd as I didn’t have to do this on my test server,so I’ll need to investigate further to avoid anyone else having the issue.

    Please let me know if that resolves the issue! Note, if your browser saves a Microsoft account, make sure your this is the account you wish to authorise the plugin with first, otherwise it will login with the wrong account.I usually do this within ingognito/private browser mode.

    Thread Starter richsadams

    (@richsadams)

    Hi Edward,

    I will try that ASAP and report back.

    Thanks again for the über fast support! ??

    Rich

    Thread Starter richsadams

    (@richsadams)

    Hi Edward,

    I was able to get things working again. I logged into the Azure/Exchange account and found that the Tenant ID was different than what I had entered initially. I tried adding the new one but it still didn’t work. So I created a new Client Secret. I added that along with the new Tenant ID to the admin page and then signed into the Azure/MS Exchange account again. I saved the info and clicked on the “Authorise plugin to integrate with Office 365” button and received the “Plugin is configured to send mail via Office 365” message.

    I’m not sure if those were the proper steps, etc., but after doing that I was able to generate emails via the Exchange account again.

    Thanks very much!

    Rich

    • This reply was modified 3 years, 10 months ago by richsadams.

    Ok, thanks Rich, not sure what’s gone on there but glad it’s working now!

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