Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Device is already in use after browser restart #49974
    Martin Tighe
    Member

    Hi Ron,
    I never got a reply to this from the developers so I fixed this myself,
    This fix works (I’ve tested this) for DSP Lite and the enterprise edition (I suspect it will also work for other versions)

    This problem occurs because of the cookie being set on this machine is set to expire in 20 years in seconds which now causes a 32 bit integer field to overflow to a negative number making it expire straight away/on browser restart.

    To fix this we need to edit the ds_build_page.php for enterprise version or dsplite_build_page.php for dsplite (Please Make Sure you back this file up before making any changes)

    Essentially any where a cookie is being set ( setrawcookie() ) set the third parameter to the following number 2147483647
    What I had to edit where the following lines;

    2 instances of…
    FROM: $resCook = setrawcookie( $v_username, $v_value, time()+(20 * YEAR_IN_SECONDS), ‘/’, ”);
    TO: $resCook = setrawcookie( $v_username, $v_value, 2147483647, ‘/’, ”);

    2 instances of…
    FROM: $resCook = setrawcookie( $v_username, $v_value, time()+(20 * YEAR_IN_SECONDS), COOKIEPATH, COOKIE_DOMAIN );
    TO: $resCook = setrawcookie( $v_username, $v_value, 2147483647, COOKIEPATH, COOKIE_DOMAIN );

    1 instance of…
    FROM: $resCook = setrawcookie( $v_username, $v_value, time()+(20 * 365 * 24 * 60 * 60), ‘/’, ”);
    TO: $resCook = setrawcookie( $v_username, $v_value, 2147483647, ‘/’, ”);

    1 instance of…
    FROM: $resCook = setrawcookie( $v_username, $v_value, time()+(20 * 365 * 24 * 60 * 60), $cookiepath, COOKIE_DOMAIN );
    TO: $resCook = setrawcookie( $v_username, $v_value, 2147483647, $cookiepath, COOKIE_DOMAIN );

    Once doing this restart the WordPress Server or services and refresh the caches on the machines being used for signage.

    Hopefully this helps and “fixes” the issue for you, I’m not aware of any official fix from the developers (Which is a shame as it is a good product)

    All the best,
    Liam Thomas
    Infrastructure Engineer

    in reply to: Device is already in use after browser restart #40542
    Martin Tighe
    Member

    Hi support, do you know when this will be fixed? We have left numerous emails and tried to call.

    We wanted to deploy this solution nationwide but we can’t.
    I understand this is due to the session cookie that gets created, which is valid for 20 years but the time value field they use is a 32 bit integer. In 2038 32 bit integer time fields overflow which makes it a negative number….?

Viewing 2 posts - 1 through 2 (of 2 total)