Closed (fixed)
Project:
Pathauto
Version:
5.x-2.0-beta2
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2007 at 06:22 UTC
Updated:
11 Dec 2007 at 11:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Hetta commentedDitto. Reverting back to beta1 fixes things.
Comment #2
gregglesI 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.
Comment #3
mo6Have 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.. ;)
Comment #4
mo6oops
Comment #5
tony_addyman commentedJust to confirm that I get the shorter list of unsupported regular expressions that george reports above. I am running PHP 5.2.
Comment #6
Wolfey commentedI'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.
Comment #7
mblazke commentedThe 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)
Comment #8
havran commentedIt 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.Comment #9
gregglesPlease also state the operating system you are using and where you got your php (custom compiled, from the OS, etc.)
Comment #10
havran commentedYes, there is maybe problem - PCRE library compiled without UTF-8 support.
Comment #11
tony_addyman commentedSoftware 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.txtand gotpcregrep: Error in command-line regex at offset 4: support for \P, \p, and \X has not been compiled
Comment #12
Wolfey commentedComment #13
emackn commentederror:
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
Comment #14
kmv commentedI have the same problem
PHP v5.1.6
MySQL v5.0.27 (in case that matters)
Apache v2.2.4
OS Linux Fedora 6
Comment #15
TBarregren commentedI 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.
Comment #16
aswalla commentedGetting 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...)
Comment #17
gregglesWould 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.
Comment #18
kmv commentedPost the patch and we'll try it.
Comment #19
gregglesIt's just reversing this: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/pathauto/pa...
Comment #20
Wolfey commentedAfter 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.
Comment #21
TBarregren commentedThe fix in #19 solved the problem for me too. Thanks!
Comment #22
jrabeemer commentedI get this bug as well using PHP4.3.9. The fix from #19 fixes this warning. Is there a real fix in the works?
Comment #23
kmv commented#19 works for me too.
Comment #24
gregglesI reverted 134473, so this should be fixed.
Comment #25
gregglesCan 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.
Comment #26
Wolfey commentedBefore 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.
Comment #27
igorik commentedHi
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
Comment #28
femrich commentedI'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?
Comment #29
Wolfey commentedAfter 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.
Comment #30
Anonymous (not verified) commentedJust 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!
Comment #31
gregglesOk, I've got another fix I committed. Thanks to the people who tested it.
Comment #32
(not verified) commentedComment #33
jmetcalf27 commentedfixed per #19 above
changed
if (preg_match('/^(\pL|\pN)+$/D', $separator)){in line 72 toif (ctype_alnum($separator)) {thanks folks.
Comment #34
greggles@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.