every time when i edit node :
warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /www/sites/6/site2046/public_html/modules/pathauto/pathauto.inc on line 72.

Comments

Hetta’s picture

Ditto. Reverting back to beta1 fixes things.

greggles’s picture

Status: Active » Closed (won't fix)

I believe this is caused by not having the right version of php. Can you confirm which versions you have?

You should do two things:

1) revert back to 5.x-1.2
2) Get your hosting provider to upgrade their php installation to 4.4 or 5.1 or higher.

mo6’s picture

Status: Closed (won't fix) » Postponed (maintainer needs more info)

Have the same error here, with PHP 5.1.2 installed, a little different error message: "PCRE does not support \P, \p or \X" (or something like that, I can't remember the exact error at the moment as I rushed to roll back to 1.2 in terror.. ;)

mo6’s picture

Status: Postponed (maintainer needs more info) » Active

oops

tony_addyman’s picture

Just to confirm that I get the shorter list of unsupported regular expressions that george reports above. I am running PHP 5.2.

Wolfey’s picture

I'm also getting the shorter list (using PHP 5.0.4 for my site and PHP 5.2.1 for a local copy - both are affected), and it shows up 45 times - the full line is as follows:

warning: preg_match() [function.preg-match]: Compilation failed: support for \P, \p, and \X has not been compiled at offset 3 in /<path to Drupal>/sites/all/modules/pathauto/pathauto.inc on line 72.

(For security, I replaced the first half of the path with "<path to Drupal>" in the code above.)

As Hetta mentioned, reverting to 2.0 Beta 1 stops this warning from appearing.

mblazke’s picture

The same for me:
warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /<i>FileSystemPathToDrupal</i>/sites/all/modules/pathauto/pathauto.inc on line 72.
both in 5.x-2.0 beta 2 (2007-08-15) and 5.x-2.x dev (2007-08-17) versions.
I'm on PHP 5.1.6 / Apache/2.0.52 (CentOS)

havran’s picture

It seem like all ppl with this error use PHP < 4.4 or < 5.1. Read http://www.php.net/manual/en/reference.pcre.pattern.syntax.php section Unicode character properties. Because regexp in file pathauto.inc in line 72 is /^(\pL|\pN)+$/D.

greggles’s picture

Status: Active » Postponed (maintainer needs more info)

Please also state the operating system you are using and where you got your php (custom compiled, from the OS, etc.)

havran’s picture

Yes, there is maybe problem - PCRE library compiled without UTF-8 support.

tony_addyman’s picture

Software details as requested: Linux - openSUSE 10.2; PHP 5.2.0 as shipped and updated from servers with fixes. If I query the RPM I get php5-5.2.0-19. The PCRE RPM is 6.7-21.

I have tested pcregrep from the shell using the pattern that is causing compilation failure. I ran
pcregrep '/^(\pL|\pN)+$/D' somefile.txt and got

pcregrep: Error in command-line regex at offset 4: support for \P, \p, and \X has not been compiled

Wolfey’s picture

External Site
  • OS: Linux (Fedora Core 4, according to "phpinfo()")
  • PHP Supplied by: Unknown (I am not hosting this copy of the site)
Internal Site
  • OS: Windows (XP Professional, SP2)
  • PHP Supplied by: XAMPP (in my case, 1.6.3a)
emackn’s picture

error:
warning: preg_match() [function.preg-match]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /opt/clients/www.mbcondofinder.com/html/sites/all/modules/pathauto/pathauto.inc on line 72.

PHP 5.1.6 (cli) (built: Jun 17 2007 11:44:56)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Linux:CENTOS
pcre.i386 4.5-3.2.RHEL4 installed

kmv’s picture

I have the same problem

PHP v5.1.6
MySQL v5.0.27 (in case that matters)
Apache v2.2.4
OS Linux Fedora 6

TBarregren’s picture

Status: Postponed (maintainer needs more info) » Active

I also have this problem with Debian 3.1 Sarge with PHP 4.3.10-16.

I take the liberty of changing the status to active since (i) the requested information has been provided and (ii) it is not shown up on the pending issue page otherwise.

aswalla’s picture

Getting the same problem as well.  PHP version 4.3.4, mysql 4.0.2 and Apache web server.  Changing line 72 to

if (preg_match('/^()+$/D', $separator)) {

got rid of the error message but I this is obviously not a true fix...basically I just blanked out what was in the parentheses for the preg_match (do not do this on your own, but was just testing to see if the error was removed...)

greggles’s picture

Would anyone complain if I just went back to ctype_alnum?

That would mean an extra config step for the BSD folks, but this alternative seems to break the module for many more situations.

kmv’s picture

Post the patch and we'll try it.

greggles’s picture

Wolfey’s picture

After changing that line manually with a text editor and editing a few nodes, I can confirm this stops the warning from showing up on both the internal and external versions of my site.

TBarregren’s picture

The fix in #19 solved the problem for me too. Thanks!

jrabeemer’s picture

I get this bug as well using PHP4.3.9. The fix from #19 fixes this warning. Is there a real fix in the works?

kmv’s picture

#19 works for me too.

greggles’s picture

Status: Active » Fixed

I reverted 134473, so this should be fixed.

greggles’s picture

Status: Fixed » Needs review
StatusFileSize
new3.52 KB

Can the folks who were having problems please test out this patch?

It's against head, so the second hunk may fail if you user still using 5.X-2.0-beta2.

Wolfey’s picture

Before testing out the patch, I upgraded my copy of Pathauto from 2.0 Beta 2 to 2.x-dev. After doing that, I applied both parts of the patch to the pathauto.inc file, uploaded it, and can confirm the warnings do not show up on both the internal and external versions of my site.

igorik’s picture

Hi
I tried to apply this patch on latest pathauto dev version but I got this message:

patching file pathauto.inc
Hunk #1 succeeded at 1 with fuzz 2.
Hunk #2 FAILED at 113.
1 out of 2 hunks FAILED -- saving rejects to file pathauto.inc.rej

Igor
somvprahe.sk

femrich’s picture

I've been experiencing the same problem with -beta2. I've reverted to -beta1, which seems to undo the problem. As I am not comfortable with patching, I will wait until the problem is corrected before upgrading. For most users at this point, perhaps the recommended version should return to -beta1?

Wolfey’s picture

After seeing an update for it on my site's "Available updates" page, I have tried out the most recent version of Pathauto 2.x-dev and - without patching any files - can confirm this error does not show up on either site.

Anonymous’s picture

Just installed the dev version from August 23, 2007 - 02:05 and I can confirm that the problem has been fixed.

Thanks for the great module!

greggles’s picture

Status: Needs review » Fixed

Ok, I've got another fix I committed. Thanks to the people who tested it.

Anonymous’s picture

Status: Fixed » Closed (fixed)
jmetcalf27’s picture

fixed per #19 above

changed if (preg_match('/^(\pL|\pN)+$/D', $separator)){ in line 72 to if (ctype_alnum($separator)) {

thanks folks.

greggles’s picture

@jmetcalf27 - it's been months since this bugfix was included (I think it was in 5.x-2.0-beta3). You should really update to 5.x-2.0 stable since it fixes a bunch of other bugs. Read the release notes of course because upgrading requires you to reconfigure some things, but upgrading would be good.