Support » Plugin: Perfect Survey » Site health status: Critical issue “An active PHP session was detected”

  • Resolved lavos

    (@lavos)


    Hi,

    I am having an issue with Perfect Survey. In my site health status, I get the following critical performance issue :

    “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 Perfect Survey is disabled, the issue disappears.

    Actually, I was able to fix this problem by changing line 137 in PerfectSurveyPostType.php in my staging environment but I want your confirmation that I am not breaking anything before applying the fix to production :

    @session_start([‘read_and_close’ => true]);

    Of course, best of all would be a quick plugin update from your team but if you are too busy, could you please at least tell me whether changing this line is ok or risky.

    Love your work so keep it up! 😉
    Thanks in advance,

    Lavos

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author perfectsurvey

    (@perfectsurvey)

    Hello @lavos and thanks for what you say. we will do an immediate check and in case we release a new version to fix this problem 🙂 thanks

    Perfect Survey Team

    On my site, your plugin also produces errors:
    1. Sesja PHP została utworzona przez wywołanie funkcji session_start(). To koliduje z REST API i żądaniami sprzężenia zwrotnego. Sesja powinna zostać zakończona przez session_write_close() przed wykonaniem jakichkolwiek żądań HTTP.

    2. REST API to jeden ze sposobów, w jaki WordPress i inne aplikacje komunikują się z serwerem. Przykładem użycia tego mechanizmu jest ekran edytora blokowego, który używa REST API do wyświetlania i zapisywania twoich wpisów i stron.
    Zapytanie REST API nie powiodło się z powodu wystąpienia błędu.
    Błąd: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed).

    can you fix it?

    I have same problem and my hosting told me it caused by mobile accelerating plugin however I found problem fixed after deactivate Perfect Survey plugin. Hope it be fixed soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.