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

CLI installer triggers debugging if langpack download fails (Fatal error in PHP 8.0)

XMLWordPrintable

    • MOODLE_39_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-69071-401
    • Hide

      Pre-requisites

      1. Testing using PHP 8.0
      2. Block network access to download.moodle.org, for instance, adding this in your local /etc/hosts file: 

        127.0.0.1    download.moodle.org

      3. The test assumes a valid path of /var/www/moodledata to use as data root - modify as appropriate for your system
      4. If you're using a Moodle folder with config.php, you'll need to remove it.

      Testing

      1. Execute the following command on a terminal:

        $ php admin/cli/install.php --lang=it --chmod=2777 --wwwroot=http://localhost:8000 --dataroot=/var/www/moodledata
        

      2. Press return to confirm (it) default
      3. Press return to confirm (2777) default
      4. Press return to confirm (http://localhost:8000) default
      5. Press return to confirm (/var/www/moodledata) default
      6. Confirm no error/debugging notice was triggered, displaying the following:

        Undefined constant "NO_DEBUG_DISPLAY" in /var/www/html/lib/weblib.php:3270
        

      7. Confirm you see the following text informing you that the lang pack could not be downloaded:

        <p>Lo scaricamento delle componenti non è andato a buon fine. Verificare le impostazioni del proxy. L'estensione PHP cURL è fortemente consigliata.</p>
        <p>Devi scaricare manualmente il file <a href="https://download.moodle.org/download.php/langpack/4.2/it.zip">https://download.moodle.org/download.php/langpack/4.2/it.zip</a>, copiarlo in "/var/www/moodledata/lang" e decomprimerlo.</p>
        

      8. Press n to exit the installer
      9. Re-enable network access to download.moodle.org
      10. Run the CLI command again
      11. Proceed to the step after confirming the location of data root:

        == Cartella dati ==
        inserisci un valore oppure premi Invio per usare il valore di default (/var/www/moodledata)
        

      12. Confirm that the Italian language pack was successfully downloaded and extracted to /var/www/moodledata/lang/it
      13. Complete installation

       

      Show
      Pre-requisites Testing using PHP 8.0 Block network access to download.moodle.org , for instance, adding this in your local /etc/hosts file:  127.0 . 0.1    download.moodle.org The test assumes a valid path of /var/www/moodledata to use as data root - modify as appropriate for your system If you're using a Moodle folder with config.php, you'll need to remove it. Testing Execute the following command on a terminal: $ php admin/cli/install.php --lang=it --chmod=2777 --wwwroot=http://localhost:8000 --dataroot=/var/www/moodledata Press return to confirm (it) default Press return to confirm (2777) default Press return to confirm ( http://localhost:8000 ) default Press return to confirm (/var/www/moodledata) default Confirm no error/debugging notice was triggered, displaying the following: Undefined constant "NO_DEBUG_DISPLAY" in /var/www/html/lib/weblib.php:3270 Confirm you see the following text informing you that the lang pack could not be downloaded: <p>Lo scaricamento delle componenti non è andato a buon fine. Verificare le impostazioni del proxy. L'estensione PHP cURL è fortemente consigliata.</p> <p>Devi scaricare manualmente il file <a href="https://download.moodle.org/download.php/langpack/4.2/it.zip">https://download.moodle.org/download.php/langpack/4.2/it.zip</a>, copiarlo in "/var/www/moodledata/lang" e decomprimerlo.</p> Press n to exit the installer Re-enable network access to download.moodle.org Run the CLI command again Proceed to the step after confirming the location of data root: == Cartella dati == inserisci un valore oppure premi Invio per usare il valore di default (/var/www/moodledata) Confirm that the Italian language pack was successfully downloaded and extracted to /var/www/moodledata/lang/it Complete installation  
    • 1
    • Team Hedgehog Sprint 1.3

      Installing a brand new 39 I got this message on the step when Moodle tries to download and install the user-selected language pack.

      Warning: Use of undefined constant NO_DEBUG_DISPLAY - assumed 'NO_DEBUG_DISPLAY' (this will throw an Error in a future version of PHP) in /var/www/html/lib/weblib.php on line 3220
       
      Warning: Use of undefined constant NO_DEBUG_DISPLAY - assumed 'NO_DEBUG_DISPLAY' (this will throw an Error in a future version of PHP) in /var/www/html/lib/weblib.php on line 3228
      
      

      The error only occurs if the download of the language pack fails (for example because of selinux, or network access restriction)

        1. result_2.png
          result_2.png
          91 kB
        2. result_1.png
          result_1.png
          274 kB
        3. Master.png
          Master.png
          142 kB
        4. 401.png
          401.png
          154 kB
        5. 400.png
          400.png
          162 kB

            pholden Paul Holden
            rezaie9 Shamim Rezaie
            Huong Nguyen Huong Nguyen
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 41 minutes
                5h 41m

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