another great wtf here:

WD php: preg_match(): Compilation failed: unrecognized character after (?< at offset 3 in                                                                                           [error]
/var/aegir/hostmaster-0.4-pre-alpha6/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 197. [1.06 sec, 17.83 MB]
preg_match(): Compilation failed: unrecognized character after (?< at offset 4 in                                                                                                   [warning]
/var/aegir/hostmaster-0.4-pre-alpha6/profiles/hostmaster/modules/hosting/package/hosting_package.instance.inc on line 194. [1.06 sec, 17.77 MB]

Comments

anarcat’s picture

Title: regex compilation errors in hosting_package.instance.inc » regex compilation errors in hosting_package.instance.inc during platform verification
Priority: Critical » Normal

I don't understand why i'm spotting this only now, but whatever. There seems to be a problem in those two regex:

    'core' => '/^(?<platform_major>\d?)\.(?<platform_minor>[x\d]*)?(-(?<package_version_type>dev|unstable|alpha|beta|rc)?(?<package_patch_level>\d)*)?$/',
    'contrib' => "/(?<platform_major>\d?)\.(?<platform_minor>[x\d]*)?(-(?<package_major>\d*)?\.(?<package_minor>[x\d]*)?(-(?<package_version_type>alpha|unstable|beta|rc|dev)?(?<package_patch_level>[\d]*)?)?)?/");

maybe it's my php version?

$ php -v
PHP 5.2.11 (cli) (built: Sep 21 2009 14:52:42) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
anarcat’s picture

Title: regex compilation errors in hosting_package.instance.inc during platform verification » regex compilation errors in hosting_package.instance.inc during verification

actually, this also affects site verification.

anarcat’s picture

Status: Active » Fixed

i fixed the silly pattern, please read http://ca.php.net/manual/en/regexp.reference.subpatterns.php before using funky subpatterns the next time (hint: (?<foo>) doesn't exist, it's (?P<foo>)).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

oliver huynh’s picture

Hi,

I got this issue also. Can anyone specify me a fix for this?

anarcat’s picture

Upgrade to 1.0 or later.

  • Commit 62b93ba on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    #725846 - fix regex syntax in package matching
    

  • Commit 62b93ba on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    #725846 - fix regex syntax in package matching