Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Moodle
  3. No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails

No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails

Scheduled Pinned Locked Moved Moodle
22 Posts 5 Posters 5.2k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C ccfu

    On further investigation this seems to be an issue with the php includes path in the Cloudron install. The adhoc tasks work fine when Moodle is installed in a LAMP App.

    @girish or @nebulon Maybe you could take another look at this?

    girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by girish
    #13

    @ccfu For some reason, the change at https://forum.cloudron.io/post/52408 never made it into the package. Looks like I just forgot. Actually, it's there. mmm.

    @ccfu can you check if you installation has that value set?

    C 1 Reply Last reply
    0
    • C ccfu

      I am having a similar problem with Moodle (4.1.2) and forum emails not being sending, but unfortunately the solution to allow cron via browser hasn't worked for me and I am still getting the error Failed opening required '/phpmailer/moodle_phpmailer.php'.

      Any other suggestions?

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #14

      @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

      but unfortunately the solution to allow cron via browser hasn't worked for me

      This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

      1 Reply Last reply
      0
      • girishG girish

        @ccfu For some reason, the change at https://forum.cloudron.io/post/52408 never made it into the package. Looks like I just forgot. Actually, it's there. mmm.

        @ccfu can you check if you installation has that value set?

        C Offline
        C Offline
        ccfu
        wrote on last edited by
        #15

        @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

        @ccfu can you check if you installation has that value set?

        Yes, it does.

        @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

        @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

        but unfortunately the solution to allow cron via browser hasn't worked for me

        This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

        Yes, that runs and completes successfully. There are also several other tasks completing regularly without issue.

        The error I am getting at /admin/tasklogs.php is:

        Execute adhoc task: mod_forum\task\send_user_notifications
        Adhoc task id: 32
        Adhoc task custom data: ["1"]
        ... started 21:14:29. Current memory use 31.7 MB.
        Debugging increased temporarily due to faildelay of 86400
        Sending messages to xxx (username removed)
        ... used 53 dbqueries
        ... used 0.32096004486084 seconds
        Adhoc task failed: mod_forum\task\send_user_notifications,Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php')
        
        girishG 1 Reply Last reply
        0
        • C ccfu

          @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

          @ccfu can you check if you installation has that value set?

          Yes, it does.

          @girish said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

          @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

          but unfortunately the solution to allow cron via browser hasn't worked for me

          This shouldn't be required. The package already runs cron. can you run /usr/local/bin/gosu www-data:www-data /usr/bin/php /app/code/new/admin/cli/cron.php ?

          Yes, that runs and completes successfully. There are also several other tasks completing regularly without issue.

          The error I am getting at /admin/tasklogs.php is:

          Execute adhoc task: mod_forum\task\send_user_notifications
          Adhoc task id: 32
          Adhoc task custom data: ["1"]
          ... started 21:14:29. Current memory use 31.7 MB.
          Debugging increased temporarily due to faildelay of 86400
          Sending messages to xxx (username removed)
          ... used 53 dbqueries
          ... used 0.32096004486084 seconds
          Adhoc task failed: mod_forum\task\send_user_notifications,Failed opening required '/phpmailer/moodle_phpmailer.php' (include_path='/app/data/moodle/lib/pear:.:/usr/share/php')
          
          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #16

          @ccfu think I might have found the problem. The cron job has to be run from a different directory. Probably why it's not picking the config correctly. Can you update to v2.3.1-1 and check?

          C 1 Reply Last reply
          1
          • girishG girish

            @ccfu think I might have found the problem. The cron job has to be run from a different directory. Probably why it's not picking the config correctly. Can you update to v2.3.1-1 and check?

            C Offline
            C Offline
            ccfu
            wrote on last edited by
            #17

            @girish

            Will do that this evening and get back to you. Thanks for looking into this.

            C 1 Reply Last reply
            1
            • C ccfu

              @girish

              Will do that this evening and get back to you. Thanks for looking into this.

              C Offline
              C Offline
              ccfu
              wrote on last edited by
              #18

              @girish

              I have updated to v2.3.1-1 and can confirm that this has resolved the problem. Thank you.

              girishG 1 Reply Last reply
              2
              • C ccfu

                @girish

                I have updated to v2.3.1-1 and can confirm that this has resolved the problem. Thank you.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #19

                @ccfu whoa, didn't expect that 🙂 thanks for verifying.

                1 Reply Last reply
                1
                • jdaviescoatesJ Offline
                  jdaviescoatesJ Offline
                  jdaviescoates
                  wrote on last edited by
                  #20

                  I'd guess the update that happened last night is why I received an email around 3am this morning saying there was a new login to my account on 12 May 2022 😆

                  I use Cloudron with Gandi & Hetzner

                  C 1 Reply Last reply
                  2
                  • jdaviescoatesJ jdaviescoates

                    I'd guess the update that happened last night is why I received an email around 3am this morning saying there was a new login to my account on 12 May 2022 😆

                    C Offline
                    C Offline
                    ccfu
                    wrote on last edited by
                    #21

                    @jdaviescoates

                    I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                    jdaviescoatesJ 1 Reply Last reply
                    3
                    • C ccfu

                      @jdaviescoates

                      I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                      jdaviescoatesJ Offline
                      jdaviescoatesJ Offline
                      jdaviescoates
                      wrote on last edited by
                      #22

                      @ccfu said in No Mails from Moodle - PHP Error in Cron / Scheduled Task for sending E-Mails:

                      @jdaviescoates

                      I made sure to remove the queued adhoc tasks before updating to prevent that from happening and users receiving notifications of past events. At least you now know that adhoc tasks are working again in your installation 😆

                      Thankfully in my case I don't yet actually have any users. I just installed to have a play around (because I do have plans to run some online courses) and haven't even really got around to doing that yet

                      I use Cloudron with Gandi & Hetzner

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search