Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

ERROR 2: POSIX collating elements

Help
GNURob
2012-07-24
2013-05-30
  • GNURob
    GNURob
    2012-07-24

    The following errors are preventing Individual / Edit / Quick Update (and most likely much more). I found evidence that this is a very old (2009) error but I didn't find a resolution. Help appreciated!

    PHP Version 5.3.8
    Apache/2.2.21
    MySQL 5.5.16

    ERROR 2: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3
    0 Error occurred on in function preg_replace
    1 called from line 241 of file functions_date.php in function default_edit_to_gedcom_date
    2 called from line 2244 of file functions_edit.php in function check_input_date
    3 called from line 171 of file edit_quickupdate.php in function check_updated_facts
    4 called from line 402 of file edit_quickupdate.php
    Warning: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3 in /server/dir/www/geno/includes/functions/functions_date.php on line 241
    ERROR 2: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3
    0 Error occurred on in function preg_replace
    1 called from line 241 of file functions_date.php in function default_edit_to_gedcom_date
    2 called from line 2244 of file functions_edit.php in function check_input_date
    3 called from line 171 of file edit_quickupdate.php in function check_updated_facts
    4 called from line 402 of file edit_quickupdate.php
    Warning: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3 in /server/dir/www/geno/includes/functions/functions_date.php on line 241
    ERROR 2: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3
    0 Error occurred on in function preg_replace
    1 called from line 241 of file functions_date.php in function default_edit_to_gedcom_date
    2 called from line 2244 of file functions_edit.php in function check_input_date
    3 called from line 171 of file edit_quickupdate.php in function check_updated_facts
    4 called from line 1112 of file edit_quickupdate.php
    Warning: preg_replace(): Compilation failed: POSIX collating elements are not supported at offset 3 in /server/dir/www/geno/includes/functions/functions_date.php on line 241 Update successful
    
     
  • GNURob
    GNURob
    2012-07-25

    Thank you George,

    I upgraded to PhpGedView 4.3.0 svn but the errors persist.

     
  • Stephen Arnold
    Stephen Arnold
    2012-07-25

    Get rid of PHP 5.3.8.  The currently supported stable (but deprecating) version of php v5.3 is v5.3.15
    Known issues were introduced with that version, even though they thought they had fixed problems from 5.2+.
    v5.3.8 is nearly a year old and has some serious security holes.
    -stephen

     
  • GNURob
    GNURob
    2012-07-25

    Hi Again,

    Upgrading to PHP Version 5.4.4 did not resolve the problem.

    This is really too bad. I'm so impressed by PGV but can't edit simple things like birth dates!

     
  • GNURob
    GNURob
    2012-07-25

    I found this explanation which makes since considering the error messages I have posted, however it does not explain why my system complains but others do not.

    our error message that “POSIX collating elements are not supported” deserves some explanation. After all, what in the world is a POSIX collating element anyway, and how can I avoid it?

    The short answer is that you have an equals sign inside your square brackets in a place where its use is reserved for future use, assuming we ever get around to implementing it, which is anything but certain. You can tickle this in Perl on the command line this way, which gives a much better error message than PHP is providing:

    % perl -le 'print "abc" =~ // || "Fail"'
    POSIX syntax  is reserved for future extensions in regex; marked by <- HERE in m/ <- HERE / at -e line 1.

     
  • GNURob
    GNURob
    2012-07-25

    Solved.

    This was a bug introduced by PCRE 8.13. 8.12 is not affected and likely represents the majority of your installed base. Versions higher than 8.13 do not have the bug (8.21 works for me).

     
  • Lester Caine
    Lester Caine
    2012-07-25

    Just a little aside here, but something that this is a perfect example of!
    PHP5.3 and 5.4 have moved so far away from the base code that PGV and a lot of other legacy applications were written and tested on that many problem have been popping up. It *IS* almost a case of not upgrading in order to maintain a stable system. I'm just working on making my own code bases 'strict' compliant, but since PEAR fails anyway it has yet to be completed.
    NOW they are discussing further 'sexing up' but I can't see any actual advantage since I'm adding nothing to functionality by trying to make any of my code run clean on PHP5.4 :(

     
  • ggpauly
    ggpauly
    2012-07-26

    Thanks for posting the resolution, that will likely be helpful to many people.