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

error 500 with import of questions to question bank

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 4.2 regressions, 4.1.5, 4.3
    • Questions
    • None
    • MOODLE_401_STABLE, MOODLE_403_STABLE

      Hello All:

          • I fixed this on my installation by replacing the curly braces with square ones *** (see below).

      I cannot import questions to the question bank; I receive an "ERROR 500" when selecting the import option. 

      ME = Moodle 4.2.4, PHP 8.2, Linux

      I had my host provider troubleshoot the problem, and it seems that PHP 8.0 (I'm using 8.2) no longer supports curly braces. The report from the host troubleshooting is below. 

      per their report below, the minimum for 4.2.4 is PHP 8.0, and I have no option to downgrade to PHP 7.4

      --From Host tech support. (the steps I provided were to select import from a question bank).
      Hello Lee,

      Thanks for the update; I've followed the steps you provided and received
      a blank page, which is typically indicative of a PHP fatal error.

      After enabling debugging and PHP error logging, I found the following
      error:

      [20-Dec-2023 13:21:46 America/New_York] PHP Fatal error:  Array and
      string offset access syntax with curly braces is no longer supported in
      /home/moodle/question/format/giftmedia/format.php on line
      381

      The error message indicates a PHP Fatal error related to the use of array
      and string offset access syntax with curly braces, a feature that was
      deprecated in PHP 7.4 and removed in PHP 8.0.

      Given that your site is currently running on PHP 8.2, this deprecated
      syntax is no longer supported, leading to the fatal error and the blank
      page.

      To resolve this issue, please consider upgrading your Moodle instance to
      a version that is fully compatible with PHP 8.2. 

      If upgrading Moodle is not an immediate option, you can change the PHP
      version for your site. 

      I recommend switching to PHP 7.4, which still supports the deprecated
      syntax used in your current Moodle version. 

      You can read more about setting up PHP error logging and changing the
      version of PHP your site uses below:

            Unassigned Unassigned
            LeeTV Lee TV
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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