Bug #61775 [Nab]: Preg_match does not support unicode.
Edit report at https://bugs.php.net/bug.php?id=61775edit=1 ID: 61775 User updated by:asersz at gmail dot com Reported by:asersz at gmail dot com Summary:Preg_match does not support unicode. Status: Not a bug Type: Bug Package:PCRE related Operating System: MacOS Lion 10.7.2 PHP Version:5.4.0 Block user comment: N Private report: N New Comment: I will recompile my PCRE and PHP. But I confirm my expression works fine in PHP 5.3.6. This expression was default configuration for class CUrlManager in Yii framework. After I upgrade my PHP 5.3.6 to 5.4.0, the warning was triggered. Same bug reporting here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659478 Thanks :-D Previous Comments: [2012-04-20 07:26:55] cataphr...@php.net Sorry, that was 5.3, but I can confirm it works with 5.4 too (PCRE version 8.12 2011-01-15). [2012-04-20 07:23:23] cataphr...@php.net Works here: glopes@nebm:~/php/php-src$ php -v PHP 5.3.10-dev (cli) (built: Feb 2 2012 11:31:13) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies glopes@nebm:~/php/php-src$ php ?php $r='/^(?Pfoo\w+)\/(?Pbar\d+)\/$/u'; var_dump(preg_match($r,'test/3423/',$m), $m); int(1) array(5) { [0]= string(10) test/3423/ [foo]= string(4) test [1]= string(4) test [bar]= string(4) 3423 [2]= string(4) 3423 } I suspect that, if anything, this has been an PCRE change. Try recompiling PHP with the bundled PCRE (--with-pcre-regex=BUNDLED, if I'm not mistaken). [2012-04-20 04:17:03] asersz at gmail dot com Warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /Users/zhangyowei/Web/lieqee/test.php on line 5 bool(false) NULL Your expression trigger a warning too. [2012-04-20 03:11:57] asersz at gmail dot com But this expression works fine in the PHP 5.3.x (and 5.2.x). And works fine without the Modifier u. Why does not works fine in PHP 5.4? [2012-04-19 21:09:09] cataphr...@php.net Your expression is wrong. Version 8.02 of PCRE, which you're using, gives that rather cryptic error, but more recent versions, including the one bundled with PHP say: Warning: preg_match(): Compilation failed: unrecognized character after (?P at offset 4 in - on line 3 Probably you want something like: ?php $r='/^(?Pfoo\w+)\/(?Pbar\d+)\/$/u'; var_dump(preg_match($r,'test/3423/',$m), $m); The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61775 -- Edit this bug report at https://bugs.php.net/bug.php?id=61775edit=1
[PHP-BUG] Bug #61775 [NEW]: Preg_match does not support unicode.
From: Operating system: MacOS Lion 10.7.2 PHP version: 5.4.0 Package: PCRE related Bug Type: Bug Bug description:Preg_match does not support unicode. Description: I am not good at english. A warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 OS: MacOSX Lion 10.7.2 Web Server: apache 2 PHP : 5.4.0 PCRE (Perl Compatible Regular Expressions) Support: enabled PCRE Library Version: 8.02 2010-03-19 By the way: the php 5.4.0 released is stable or not ? thanks. Test script: --- ?php $r='/^(?P\w+)\/(?P\d+)\/$/u'; var_dump(preg_match($r,'test')); Expected result: What does the warning mean ? The preg_match should be return 0 without warnings. Actual result: -- Warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /Users/zhangyowei/Web/lieqee/test.php on line 4 bool(false) -- Edit bug report at https://bugs.php.net/bug.php?id=61775edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61775r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61775r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61775r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61775r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61775r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61775r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61775r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61775r=needscript Try newer version: https://bugs.php.net/fix.php?id=61775r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61775r=support Expected behavior: https://bugs.php.net/fix.php?id=61775r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61775r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61775r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61775r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61775r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61775r=dst IIS Stability: https://bugs.php.net/fix.php?id=61775r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61775r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61775r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61775r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61775r=mysqlcfg
Bug #61775 [Nab]: Preg_match does not support unicode.
Edit report at https://bugs.php.net/bug.php?id=61775edit=1 ID: 61775 User updated by:asersz at gmail dot com Reported by:asersz at gmail dot com Summary:Preg_match does not support unicode. Status: Not a bug Type: Bug Package:PCRE related Operating System: MacOS Lion 10.7.2 PHP Version:5.4.0 Block user comment: N Private report: N New Comment: But this expression works fine in the PHP 5.3.x (and 5.2.x). And works fine without the Modifier u. Why does not works fine in PHP 5.4? Previous Comments: [2012-04-19 21:09:09] cataphr...@php.net Your expression is wrong. Version 8.02 of PCRE, which you're using, gives that rather cryptic error, but more recent versions, including the one bundled with PHP say: Warning: preg_match(): Compilation failed: unrecognized character after (?P at offset 4 in - on line 3 Probably you want something like: ?php $r='/^(?Pfoo\w+)\/(?Pbar\d+)\/$/u'; var_dump(preg_match($r,'test/3423/',$m), $m); [2012-04-19 17:07:44] asersz at gmail dot com Description: I am not good at english. A warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 OS: MacOSX Lion 10.7.2 Web Server: apache 2 PHP : 5.4.0 PCRE (Perl Compatible Regular Expressions) Support: enabled PCRE Library Version: 8.02 2010-03-19 By the way: the php 5.4.0 released is stable or not ? thanks. Test script: --- ?php $r='/^(?P\w+)\/(?P\d+)\/$/u'; var_dump(preg_match($r,'test')); Expected result: What does the warning mean ? The preg_match should be return 0 without warnings. Actual result: -- Warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /Users/zhangyowei/Web/lieqee/test.php on line 4 bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=61775edit=1
Bug #61775 [Com]: Preg_match does not support unicode.
Edit report at https://bugs.php.net/bug.php?id=61775edit=1 ID: 61775 Comment by: asersz at gmail dot com Reported by:asersz at gmail dot com Summary:Preg_match does not support unicode. Status: Not a bug Type: Bug Package:PCRE related Operating System: MacOS Lion 10.7.2 PHP Version:5.4.0 Block user comment: N Private report: N New Comment: Warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /Users/zhangyowei/Web/lieqee/test.php on line 5 bool(false) NULL Your expression trigger a warning too. Previous Comments: [2012-04-20 03:11:57] asersz at gmail dot com But this expression works fine in the PHP 5.3.x (and 5.2.x). And works fine without the Modifier u. Why does not works fine in PHP 5.4? [2012-04-19 21:09:09] cataphr...@php.net Your expression is wrong. Version 8.02 of PCRE, which you're using, gives that rather cryptic error, but more recent versions, including the one bundled with PHP say: Warning: preg_match(): Compilation failed: unrecognized character after (?P at offset 4 in - on line 3 Probably you want something like: ?php $r='/^(?Pfoo\w+)\/(?Pbar\d+)\/$/u'; var_dump(preg_match($r,'test/3423/',$m), $m); [2012-04-19 17:07:44] asersz at gmail dot com Description: I am not good at english. A warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 OS: MacOSX Lion 10.7.2 Web Server: apache 2 PHP : 5.4.0 PCRE (Perl Compatible Regular Expressions) Support: enabled PCRE Library Version: 8.02 2010-03-19 By the way: the php 5.4.0 released is stable or not ? thanks. Test script: --- ?php $r='/^(?P\w+)\/(?P\d+)\/$/u'; var_dump(preg_match($r,'test')); Expected result: What does the warning mean ? The preg_match should be return 0 without warnings. Actual result: -- Warning: preg_match(): Compilation failed: unknown option bit(s) set at offset 0 in /Users/zhangyowei/Web/lieqee/test.php on line 4 bool(false) -- Edit this bug report at https://bugs.php.net/bug.php?id=61775edit=1
[PHP-BUG] Bug #53289 [NEW]: about __destruct
From: Operating system: Windows 7 PHP version: 5.2.14 Package: Unknown/Other Function Bug Type: Bug Bug description:about __destruct Description: I am not good at english.. Read the following code .. An error occurs when you run it.. (there will be white-screen in my codes.) Chinese : å¦æä½ è½çæä¸æ.é£æ好ä¸è¿äº. ä¸é¢ç代ç æ认为__destruct被继æ¿ä¹å, ä¼å¯¼è´ä¸é¢ä¸¤ä¸ªç±»ç对象å¨éæ¾æ¶åºç°æ æ³æ¾å°static $childsçé误. ä½æ¯å¨æç代ç éé¢ä»ç¡®å®æ²¡æåºç°è¿ä¸ªé误, åèè¿è¡äºå¾ä¹ ä¹ååºç°äºç½å±. çä¸å»å¾åä¸ä¸ªæ»å¾ªç¯. Test script: --- error_reporting(E_ALL); ini_set('display_errors', 'on'); abstract class Father { private static $childs = array(); public static function getChild( $child ) { if (!array_key_exists($child, self::$childs)) { self::$childs[$child] = new $child; } return self::$childs[$child]; } public function __destruct() { foreach (self::$childs as $i = $child) { self::$childs[$i] = $child = null; } } } class Child1 extends Father {} class Child2 extends Father {} $child1 = Father::getChild('Child1'); $child2 = Father::getChild('Child2'); -- Edit bug report at http://bugs.php.net/bug.php?id=53289edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53289r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53289r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53289r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53289r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53289r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53289r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53289r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53289r=needscript Try newer version: http://bugs.php.net/fix.php?id=53289r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53289r=support Expected behavior: http://bugs.php.net/fix.php?id=53289r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53289r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53289r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53289r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53289r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=53289r=dst IIS Stability: http://bugs.php.net/fix.php?id=53289r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53289r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53289r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53289r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53289r=mysqlcfg
#51125 [NEW]: a bug about mysql_pconnect
From: asersz at gmail dot com Operating system: Windows 7 PHP version: 5.2.12 PHP Bug Type: MySQL related Bug description: a bug about mysql_pconnect Description: I am not good at english. My apache is running (Port 80). URL is 'localhost:80' or 'localhost'. Function : mysql_pconnect('localhost:80', 'root', '123'); then, no error and the function never return. Thanks. Reproduce code: --- set_time_limit(0); // make sure your apache is running (Port 80). mysql_pconnect('localhost:80', 'root', '123'); Expected result: Just like a loop ? -- Edit bug report at http://bugs.php.net/?id=51125edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51125r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51125r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51125r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=51125r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51125r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=51125r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=51125r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=51125r=needscript Try newer version: http://bugs.php.net/fix.php?id=51125r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=51125r=support Expected behavior: http://bugs.php.net/fix.php?id=51125r=notwrong Not enough info: http://bugs.php.net/fix.php?id=51125r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=51125r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=51125r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51125r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=51125r=dst IIS Stability: http://bugs.php.net/fix.php?id=51125r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=51125r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=51125r=float No Zend Extensions: http://bugs.php.net/fix.php?id=51125r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=51125r=mysqlcfg