From: pageexec at freemail dot hu Operating system: linux PHP version: 5.2.6 PHP Bug Type: PCRE related Bug description: _pcre_utt_names is overridden from libpcre.so and results in \p match failure
Description: ------------ the pcre extension contains a copy of some specific version of libpcre, with most of the names prefixed with php_ except for _pcre_utt_names which is not prefixed. this means that if a libphp user such as apache2 also happens to load libpcre (mine's directly linked against it so it loads before libphp), the symbols from the latter may override _pcre_utt_names and libphp will use the wrong names table when analyzing \p and \P (the indices would come from php__pcre_utt which is specific for the _pcre_utt_names table contained in the pcre extension). Reproduce code: --------------- preg_match_all("/\pL/u", "php", $matches); print_r($matches); Expected result: ---------------- Array ( [0] => Array ( [0] => p [1] => h [2] => p ) ) Actual result: -------------- Warning: preg_match_all() [function.preg-match-all]: Compilation failed: unknown property name after \P or \p at offset 3 in <test.php> on line <x> -- Edit bug report at http://bugs.php.net/?id=46174&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46174&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46174&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46174&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46174&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=46174&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46174&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46174&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46174&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46174&r=support Expected behavior: http://bugs.php.net/fix.php?id=46174&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46174&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46174&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46174&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46174&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46174&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46174&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46174&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46174&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46174&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46174&r=mysqlcfg