Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-7947

Use CURL extension functions instead of snoopy and fopen() if available

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.7, 1.8
    • Fix Version/s: 1.9
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Currently we are using several ways to connect to other servers from PHP code. The easiest way is to use standard cURL php extension. It should be available on majority of servers and it also supports SSL: http://php.net/manual/en/ref.curl.php CURL is considered to be more secure than fopen, snoopy library is buggy and not maintained, there is also the lowlevel socket workaround.

      We might use something like getURL() from lib/typo3/class.t3lib_div.php - it has a fallback to fopen(). We could implement proxy user&password (MDL-7921). Sample fsockopen() proxy with user&password code at http://www.php.net/manual/en/function.fsockopen.php#58196

      fopen used in:
      1/ healthcenter - slashargument test
      2/ language import
      3/ timezone import
      4/ installer

      snoopy used in:
      1/ magpie - see MDL-7946 (simplepie uses CURL)

      curl already required for:
      1/ cas

      fsocksopen used in (some of them could use the proxy user&password too):
      1/ language import - with proxy
      2/ auth/fc
      3/ enrol/authorize
      4/ paypal ipn
      5/ ipatlas
      6/ phpmailer

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            fopen's are eliminated in 1.9, the rest will have to wait till 2.0

            Show
            skodak Petr Skoda added a comment - fopen's are eliminated in 1.9, the rest will have to wait till 2.0
            Hide
            skodak Petr Skoda added a comment -

            not fixed:
            1/ health center - needs full rewrite
            2/ cas - cURL required
            3/ auth/fc
            4/ paypal - needs external access for paypal verification anyway
            5/ php mailer - would use internal mail serverprobably

            closing now - no more changes expected

            Show
            skodak Petr Skoda added a comment - not fixed: 1/ health center - needs full rewrite 2/ cas - cURL required 3/ auth/fc 4/ paypal - needs external access for paypal verification anyway 5/ php mailer - would use internal mail serverprobably closing now - no more changes expected

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                skodak Petr Skoda
                Tester:
                Nobody
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Mar/08