Home Revolution Fullwidth Forums Digitalsignagepress Problems and Help Device is already in use after browser restart

Viewing 3 reply threads
  • Author
    Posts
    • #37855
      Patrick
      Guest

      Hi,
      at the moment I´m testing the DigitalSignagePress Light Plugin for the WordPress page.

      When I create a device and show that url on my notebook everything looks quiet good. But if I close my browser and reopen it again I get an error message.

      “This device number is already occupied…” and so on.

      I know that the session use a cookie but how can I realise a stable connection via browser? Also after a reboot of the notebook the same issue is there.

      Are there any apache or php settings I can change to get that stable?

      Best regards
      Patrick

    • #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….?

    • #49910
      Ron Groenewold
      Guest

      We are experiencing the same issue in our beta test at one site for a signboard. Everytime the browser restarts the device shows as in use. I can manually load the wp admin dash and in DSP allow another device to use URL then refresh. This is kind of hard to do as the site does not have an onsite support person and techs are some distance away8.

    • #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

Viewing 3 reply threads
  • You must be logged in to reply to this topic.