Closed (fixed)
Project:
Messaging
Version:
6.x-1.1
Component:
PHPMailer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2009 at 19:15 UTC
Updated:
8 May 2009 at 00:10 UTC
Getting this error whenever PHPMailer sends an email.
preg_match() [function.preg-match]: Compilation failed: unrecognized character after (?< at offset 8 in \mydrupal\sites\default\modules\messaging\messaging_phpmailer\messaging_phpmailer.module on line 81.
Server: PHP 5.1.5, IIS 6, Windows 2003
Tested on PHP 5.2.8, Apache 2.2.11, Windows XP, no error.
Tested on PHP 5.1.4, Apache 6.0.63, Windows XP, no error.
PCRE library versions match on both the production and test servers.
So, no explanation for this error at all.
I fixed it by rewriting the preg_match() call to avoid named subpatterns, and added a couple if statements to preserve the interface on the $from variable.
| Comment | File | Size | Author |
|---|---|---|---|
| messaging_phpmailer_named_subpattern_fix.patch | 963 bytes | Ogredude |
Comments
Comment #1
jose reyero commentedI'd consider this fix if someone else can test it on *non Windows* machines, otherwise it may be a php on windows or charset related issue...
(I just wouldn't like to break it on *nix which is the one most peoples uses)
Comment #2
domesticat commentedI'm seeing this error on a non-Windows machine. I've applied the patch and will keep an eye on it for the next few days to see if the PHP errors stop.
Comment #3
domesticat commentedI haven't seen any errors in the past few days when using the patch on my Ubuntu box.
Comment #4
fred0 commentedJust started testing PHPMailer and immediately got this message on a CentOS linux box. The patch seems to get rid if the error, but I can't vouch for it beyond that as I haven't tested enough.
Comment #5
jose reyero commentedOk, committed (I've cleaned the variable names).
Thanks for the patch and for testing.