6.0.0-beta1
7/4/25

[#10294] PCRE compilation failure in Horde_Ldap
Summary PCRE compilation failure in Horde_Ldap
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners
Requester steti (at) monmouth (dot) com
Created 06/30/2011 (5118 days ago)
Due
Updated 07/01/2011 (5117 days ago)
Assigned
Resolved 07/01/2011 (5117 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/01/2011 04:36:22 PM Jan Schneider State ⇒ Resolved
 
07/01/2011 04:36:11 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

[jan] Always use negative lookbehind assertions to work around bug in 
PCRE 6.6 (Steve Teti, Bug #10294).

  4 files changed, 46 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/981d58b8b4cfb1c128fc48dcdab1aacc4737fbdf
06/30/2011 05:45:46 PM steti (at) monmouth (dot) com Comment #3 Reply to this comment
Upon further investigation, it appears that this may be a bug in my 
version of PCRE.

http://bugs.exim.org/show_bug.cgi?id=559

Fixed in PCRE 6.7, but CentOS 5 is using PCRE 6.6.

On a Fedora Core 14 box running PHP 5.3.5 and PCRE 8.10, the positive 
lookbehind assertion works correctly.

Nevertheless, this patch gets this function working in CentOS, which 
may be valuable.
06/30/2011 04:47:14 PM steti (at) monmouth (dot) com Comment #2
New Attachment: 0001-Changed-lookbehind-assertions-in-preg_split-from-pos.patch Download
Reply to this comment
Patch for framework/Ldap/lib/Horde/Ldap/Util.php
06/30/2011 04:45:11 PM steti (at) monmouth (dot) com Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ PCRE compilation failure in Horde_Ldap
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
While working with calendar permissions in Kronolith, I found that 
once I set permissions on a calendar for a particular group, the group 
disappeared from the permissions window, although the permissions 
seemed to work correctly.  I found the following errors in the horde 
log:

HORDE [kronolith] PHP ERROR: preg_split(): Compilation failed: 
lookbehind assertion is not fixed length at offset 9 [pid 24322 on 
line 292 of "/usr/share/pear/Horde/Ldap/Util.php

It appears that my version of PHP does not like the formatting of that 
regex.  There were three instances of a regex like this used in 
preg_split:

/(?<=[^\\\\]),/

It appears to me that the purpose of this regex is to split the string 
on commas, as long as the comma is not escaped by a preceding 
backslash.  I changed the three instances of this regex to a negative 
lookbehind assertion, which my version of PHP seems to like better:

/(?<!\\\\),/

I see other instances of this type of negative lookbehind assertion in 
Util.php, and it seems to be working on my setup.  I will attach a 
patch to Util.php in a subsequent post.

My server config:
CentOS 5.6 x86_64
Apache 2.2.3 installed via yum
PHP 5.3.3 installed via yum
PCRE 6.6 installed via yum

Saved Queries