Closed (fixed)
Project:
Pathauto
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Aug 2007 at 17:33 UTC
Updated:
8 Sep 2007 at 16:33 UTC
Good Day,
I am getting this php error message (see below). How can I fix this or any ideas on how to fix it?
preg_match(): Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 3 in /hsphere/local/home/useraccount/website.com/modules/pathauto/pathauto.module on line 323.
Thank you very much,
Mark
Comments
Comment #1
greggleswhat version of php are you using? I assume it's one of the ones that isn't supported.
The project page and the 5.x-2 release notes both say that you need to use PHP4.4 or PHP5.1 or higher to get Pathauto5.x-2.x to work. Your solution is either to just use Pathauto 5.x-1.x (which is very similar...) or upgrade your PHP.
Comment #2
mrgoltra commentedthanks for the info, yeah my hosting provider is still using an older version of php... I been asking them to upgrade and they say its in the works... thanks.
Comment #3
gregglesOk - good to know.
Comment #4
gateone commentedHm, my PHP version is 5.1.2 and I do get the same error...
Comment #5
nckabill commentedI am getting the same errors/warnings although it does appear to work still. My php is version 5.1.6
Comment #6
nckabill commentedI get a slightly different warning actually:
Comment #7
gateone commentedThe error has to do with the preg_match() function in line 72:
The problem here is related to PCRE library (Perl Compatible Regular Expressions - http://www.pcre.org). Depending on version and compilation, this library may fully support UTF-8 characters.
And this is what is happening right here. It is the grep pattern (\pL|\pN) that is causing the problem. (\pL|\pN) means "match either all (positive) Letters or match all positive Numbers. Yet we are in Unicode Regular Expressions due to the \pL or \pN notation...
Now I am not really the greatest regular expressions specialist - so PLEASE do correct me, which you probably must ;-) - but what if we change this preg_match to this:
Somehow this seems to be working for me - however I am not sure if things now go RIGHT or if maybe things start going wrong...
Steve
Comment #8
gregglesGood catch. This has actually been fixed in the latest 5.x-2.x-dev versions, so please use those. The regex you provided works fine for ~75% of the users in the world, but I went with one that should work for 100% of them. It's tricky stuff indeed - I got help from chx on this.