Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.5, 1.7.2, 1.8, 1.9
    • Component/s: General
    • Labels:
      None
    • Environment:
      Linux
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      28450

      Description

      It seems like a bug has existed for a long time since 1.6

      After upgrade to 1.6 from 1.5.3 several days ago, I found moodle can't send email. In the send email page, after submiting and waiting for a long time, I got the message:

      Fatal error: Maximum execution time of 30 seconds exceeded in /........./moodle/lib/textlib.class.php on line 215

      The line number is not a constant. Sometimes it is in function strlen and substr.

      I traced the code and found that moodle went into a infinite loop in function CreateHeader() of phpmailer.

      It's a fatal bug but I don't know why nobody reported it. Only me meet it?

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          From Sunner Sun (sunner_sun at 163.com) Tuesday, 1 August 2006, 06:00 PM:

          I did more test about the bug.

          It happened when I set sitemailcharset to GB18030. I also test other charsets that moodle support, only GB18030 show the bug.

          Show
          Martin Dougiamas added a comment - From Sunner Sun (sunner_sun at 163.com) Tuesday, 1 August 2006, 06:00 PM: I did more test about the bug. It happened when I set sitemailcharset to GB18030. I also test other charsets that moodle support, only GB18030 show the bug.
          Hide
          Petr Škoda added a comment -

          some basic patch committed into 1.8 and HEAD, needs review!

          Show
          Petr Škoda added a comment - some basic patch committed into 1.8 and HEAD, needs review!
          Hide
          Sunner Sun added a comment -

          I tested the patch in 1.7. It works for the mail body text, thank you!
          But the name of sender is wrong. That is:

          In gb2312, the mail is sent by "?????? [root@cms.hit.edu.cn]". But in gb18030, it is "???????????? [root@cms.hit.edu.cn]".

          Show
          Sunner Sun added a comment - I tested the patch in 1.7. It works for the mail body text, thank you! But the name of sender is wrong. That is: In gb2312, the mail is sent by "?????? [root@cms.hit.edu.cn] ". But in gb18030, it is "???????????? [root@cms.hit.edu.cn] ".
          Hide
          Petr Škoda added a comment -

          yep, gb18030 is not supported by PHP, mbstring extension or typo3 library - I wonder if it ever worked for anybody.

          my +1 to remove it from config options.

          Show
          Petr Škoda added a comment - yep, gb18030 is not supported by PHP, mbstring extension or typo3 library - I wonder if it ever worked for anybody. my +1 to remove it from config options.
          Hide
          Petr Škoda added a comment -

          I will have to find out more about this problem, now I can at least copy/paste the text above - thanks!

          Show
          Petr Škoda added a comment - I will have to find out more about this problem, now I can at least copy/paste the text above - thanks!
          Hide
          Petr Škoda added a comment -

          fixed in cvs

          Show
          Petr Škoda added a comment - fixed in cvs
          Hide
          Petr Škoda added a comment -

          Solution was to add our special mime header encoding for gb18030.

          Thanks for the report, please comment here or reopen in case of any problems

          Show
          Petr Škoda added a comment - Solution was to add our special mime header encoding for gb18030. Thanks for the report, please comment here or reopen in case of any problems

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: