Support » Fixing WordPress » class-phpmailer.php php time out at line 879 (pcre8)

  • Hi,

    I have a 4.0 wordpress installation, configured to send an e-mail if a new comment is made.
    But since some time (after a wp update) the sending of the e-mail fails, the comment is stored anyway.
    The error is a php session timeout in line 879 of class-phpmailer.php. This line contains the pcre8 check for the e-mail address:

    return (bool)preg_match(
                        '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
                        '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
                        '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
                        '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
                        '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
                        '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
                        '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
                        '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
                        '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
                        $address
                    );

    This check is made if if (version_compare(PCRE_VERSION, '8.0') >= 0) is true.

    I don´t know why, but it´s failing on my web space. When I change the check, so that it uses the old version it´s working correctly. So something is wrong with this preg_match. Anyone any idea what´s wrong here or what the reason could be?

    The pcre support is enabled, see php info: http://abload.de/img/pcre8nrk2f.png

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘class-phpmailer.php php time out at line 879 (pcre8)’ is closed to new replies.