Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10278

Improve timeout handling in get_remote_file()

    Details

    • Type: Improvement
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.10-RC1
    • Component/s: ACP
    • Labels:
      None
    • Environment:
      All environments

      Description

      If phpBB's versioning server (http://version.phpbb.com/) is down or uncontactable (as happened on the 3.0.9 update), the ACP may fail to load on any page that relies on contacting phpBB's servers. This includes the ACP homepage where most users will enter the ACP.

      Suggestion to fix:

      Use CURL with a fixed timeout of 5-10 seconds so even if the server is down the ACP will eventually load after a graceful timeout.

        Issue Links

          Activity

          Hide
          bantu Andreas Fischer added a comment -

          cURL is not an option because it is not available everywhere. Another thing to consider is that file_get_contents() and fopen('http://...') depend on "allow_url_fopen = Yes".

          fsockopen() on the other side does work in the majority of all cases and does not rely on allow_url_fopen which is why we're using it.

          Show
          bantu Andreas Fischer added a comment - cURL is not an option because it is not available everywhere. Another thing to consider is that file_get_contents() and fopen('http://...') depend on "allow_url_fopen = Yes". fsockopen() on the other side does work in the majority of all cases and does not rely on allow_url_fopen which is why we're using it.
          Hide
          AbyssUnderground AbyssUnderground [X] (Inactive) added a comment -

          Most hosts should allow this, but would it possible to have a check when installing and allow it to choose a suitable method?If not, how about not making it check the phpBB update server on the entry page to the ACP but rather have it check via AJAX instead once the page loads? This would allow the page to load and at the same time if the update server is down it will just fail to load the AJAX request.

          Show
          AbyssUnderground AbyssUnderground [X] (Inactive) added a comment - Most hosts should allow this, but would it possible to have a check when installing and allow it to choose a suitable method?If not, how about not making it check the phpBB update server on the entry page to the ACP but rather have it check via AJAX instead once the page loads? This would allow the page to load and at the same time if the update server is down it will just fail to load the AJAX request.
          Hide
          bantu Andreas Fischer added a comment -

          For 3.0.x better timeout handling has to be added to get_remote_file(). For 3.1.x there are far more options available.

          Show
          bantu Andreas Fischer added a comment - For 3.0.x better timeout handling has to be added to get_remote_file(). For 3.1.x there are far more options available.

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              AbyssUnderground AbyssUnderground [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development