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

Fatal error during installation if PHP curl extension is not installed

XMLWordPrintable

    • MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-57163-undefined-function-curl_version
    • Hide

      1) Start installing Moodle on the system without curl PHP extension.
      2) After accepting license agreement

      • Confirm you can see "Server checks" page (/admin/index.php?cache=0&lang=en&agreelicense=1). Page must not be blank or contain messages about PHP errors.
      • Confirm you see the table row with the following cells: "php_extension", "curl" "must be installed and enabled".
      • Confirm you see "cURL PHP extension is not installed" message in "Other checks" table.
      Show
      1) Start installing Moodle on the system without curl PHP extension. 2) After accepting license agreement Confirm you can see "Server checks" page (/admin/index.php?cache=0&lang=en&agreelicense=1). Page must not be blank or contain messages about PHP errors. Confirm you see the table row with the following cells: "php_extension", "curl" "must be installed and enabled". Confirm you see "cURL PHP extension is not installed" message in "Other checks" table.

      Steps to reproduce:
      1) Start installing Moodle on the system without curl PHP extension (in my case it was a Debian Linux box without php5-curl package installed).
      2) After accepting license agreement you get redirected to "Server checks" page (/admin/index.php?cache=0&lang=en&agreelicense=1).

      Expected behavior:
      The page should load properly and display the information about missing curl extension.

      Actual behavior:
      In production environment this page is blank (because of disabled error reporting in PHP). In development environment with E_ALL error reporting level this page displays the following error:

      PHP Fatal error: Call to undefined function curl_version() in /path/to/moodle/lib/upgradelib.php on line 2334

      The problem is caused by changes introduced recently in MDL-55777:
      https://github.com/moodle/moodle/commit/f2330472f0963985deb34ca72ee2b33a6d4358b7#diff-ec328f1a30e59aed57fc4f0555f82f44R875

      The proposed fix (updated):
      https://github.com/vvzh/moodle/commits/MDL-57163-undefined-function-curl_version

            vvzh Vladimir Zhirov
            vvzh Vladimir Zhirov
            Matteo Scaramuccia Matteo Scaramuccia
            David Monllaó David Monllaó
            Ankit Agarwal Ankit Agarwal
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.