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

Display error when Path to PHP CLI is not configured and a task is run

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-74141-master
    • Hide
      1. Log in as an admin and go to Site administration > Server > System paths.
      2. Set "Path to PHP CLI" to the path to your PHP executable.
      3. Go to Site administration > Server > Tasks > Scheduled tasks.
      4. Confirm that there is a "Run now" button for most (if not all) of the tasks.
      5. Click "Run now" for the "Forum mailings and maintenance jobs" task.
      6. On the confirmation prompt, confirm to run the task.
      7. Confirm that the task executes successfully without any errors (except maybe when the outgoing email settings have not been properly configured and that Moodle can't send email messages. This is fine. The important thing is that the task executes okay.)
      8. Go back to the Scheduled tasks page.
      9. Open another browser tab and go to Site administration > Server > System paths
      10. Remove the value in "Path to PHP CLI".
      11. Back on the Scheduled tasks page, click on "Run now" in any of the tasks listed.
      12. Confirm that you get an error that the path to the PHP CLI can't be found.
      13. Click on "Continue".
      14. Confirm that you are redirected to the System paths page.
      15. Set "Path to PHP CLI" to the path to your PHP executable.
      16. Go back to the scheduled tasks page.
      17. Confirm that there is a "Run now" button for most (if not all) of the tasks.
      18. Open another browser tab and go to Site administration > Security > Site security settings
      19. Disable "Allow 'Run now' for scheduled tasks" and Save changes.
      20. Back on the Scheduled tasks page, click on "Run now" in any of the tasks listed.
      21. Confirm that you get the error: "Sorry, but you do not currently have permissions to do that (Run now)."
      22. Click on "Continue".
      23. Confirm that you are redirected to the Scheduled tasks page.
      Show
      Log in as an admin and go to Site administration > Server > System paths. Set " Path to PHP CLI " to the path to your PHP executable. Go to Site administration > Server > Tasks > Scheduled tasks. Confirm  that there is a "Run now" button for most (if not all) of the tasks. Click " Run now " for the " Forum mailings and maintenance jobs " task. On the confirmation prompt, confirm to run the task. Confirm  that the task executes successfully without any errors (except maybe when the outgoing email settings have not been properly configured and that Moodle can't send email messages. This is fine. The important thing is that the task executes okay.) Go back to the Scheduled tasks page. Open another browser tab and go to Site administration > Server > System paths Remove the value in " Path to PHP CLI ". Back on the Scheduled tasks page, click on " Run now " in any of the tasks listed. Confirm  that you get an error that the path to the PHP CLI can't be found. Click on " Continue ". Confirm  that you are redirected to the System paths page. Set " Path to PHP CLI " to the path to your PHP executable. Go back to the scheduled tasks page. Confirm  that there is a "Run now" button for most (if not all) of the tasks. Open another browser tab and go to Site administration > Security > Site security settings Disable "Allow 'Run now' for scheduled tasks" and Save changes. Back on the Scheduled tasks page, click on " Run now " in any of the tasks listed. Confirm that you get the error: "Sorry, but you do not currently have permissions to do that (Run now)." Click on " Continue ". Confirm that you are redirected to the Scheduled tasks page.
    • Moppies Kanban

      As described in MDLQA-16593, the expected behaviour when "Path to PHP CLI" is not defined but a task is run using "Run now" UI link, is to display the message: "Cannot find the path to the PHP CLI executable so task execution aborted. Set the 'Path to PHP CLI' setting in Site administration / Server / System paths.".

      However, right now, the following error is displayed: "Sorry, but you do not currently have permissions to do that (Run now).".

      Besides, the redirect page is not correct (it should be redirected to System paths page).

       

       

            sarjona Sara Arjona (@sarjona)
            sarjona Sara Arjona (@sarjona)
            Amaia Anabitarte Amaia Anabitarte
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 55 minutes
                1h 55m

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