#39405 [Com]: regular expression breaking on strings = 24999 characters
ID: 39405 Comment by: ludvig dot ericson at gmail dot com Reported By: spam at dragy dot de Status: Open Bug Type: PCRE related Operating System: Any PHP Version: 5.2.0 New Comment: This is because of limits intentionally set, see the ini setting pcre.backtrack_limit. Previous Comments: [2006-11-06 18:45:23] spam at dragy dot de Description: The following preg_replace breaks when the string is = 24999 characters. Works perfectly fine with 24998 characters and worked fine with any strings in PHP 5.1.5. Reproduce code: --- ?php $string = str_repeat('a', 10); echo preg_replace('#(^.*|.*)(\[(php|html|noparse)\].*\[/\\3])(.*|.*$)#siUe', '', $string); ? Expected result: 100.000 times 'a' Actual result: -- nothing -- Edit this bug report at http://bugs.php.net/?id=39405edit=1
#36631 [NEW]: Prepared statements failing with no apparent reason
From: ludvig dot ericson at gmail dot com Operating system: Windows XP PHP version: 5CVS-2006-03-06 (snap) PHP Bug Type: MySQLi related Bug description: Prepared statements failing with no apparent reason Description: When I run this code: http://nopaste.php-q.net/196469 (I removed the LIMIT on line 48 too) I get two warnings: Warning: mysqli_stmt::bind_param() [function.bind-param]: Number of variables doesn't match number of parameters in prepared statement in C:\Web\Apache\lnkrec\core\UserSystem.inc.php on line 50 Warning: mysqli_stmt::bind_result() [function.bind-result]: Number of bind variables doesn't match number of fields in prepared statement. in C:\Web\Apache\lnkrec\core\UserSystem.inc.php on line 52 I'm thinking this is really weird since the amount of parameters are just as many as there should be. I have tested my MySQL query outside PHP, and it works fine syntactically. Futhermore, $stmt-param_count is 0. The Database class is defined as: http://nopaste.php-q.net/196448 and therefore seemingly transparent in this case. -- Edit bug report at http://bugs.php.net/?id=36631edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36631r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36631r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36631r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36631r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36631r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36631r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36631r=needscript Try newer version:http://bugs.php.net/fix.php?id=36631r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36631r=support Expected behavior:http://bugs.php.net/fix.php?id=36631r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36631r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36631r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36631r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36631r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36631r=dst IIS Stability:http://bugs.php.net/fix.php?id=36631r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36631r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36631r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36631r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36631r=mysqlcfg
#34331 [NEW]: Seg Fault when variables_order is empty
From: ludvig dot ericson at gmail dot com Operating system: Gentoo Linux 2.6 PHP version: 5.1.0RC1 PHP Bug Type: Reproducible crash Bug description: Seg Fault when variables_order is empty Description: If the php.ini directive variables_order is set to PHP will crash when run i CLI mode (don't know about apache handler). It appears that it doesn't affect it when using -d variables_order= at the command line, though. I am also using the disable_functions directive to disallow session_* related functions Reproduce code: --- $ php -c php.ini -r echo 'hello world'; Expected result: hello world$ Actual result: -- Segmentation fault $ -- Edit bug report at http://bugs.php.net/?id=34331edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34331r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34331r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34331r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=34331r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=34331r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34331r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34331r=needscript Try newer version: http://bugs.php.net/fix.php?id=34331r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34331r=support Expected behavior: http://bugs.php.net/fix.php?id=34331r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34331r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34331r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=34331r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34331r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=34331r=dst IIS Stability: http://bugs.php.net/fix.php?id=34331r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34331r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34331r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34331r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34331r=mysqlcfg
#33652 [NEW]: $this not available in a variable variable
From: ludvig dot ericson at gmail dot com Operating system: Windows XP PHP version: 5.0.4 PHP Bug Type: Variables related Bug description: $this not available in a variable variable Description: Using variable variables ($$MyVar) in classes, through functions that is, doesn't allow $this to be used. I tried with $this (notice the $) too, no difference. A workaround is to check the object name, if it's this you could $this-$Mem instead. Reproduce code: --- ?php class Foo { public $MyVal = Test; public Bar($Obj, $Mem) { return ${$Obj}-$Mem; } } $TheObject = new Foo(); $Objname = this; $Memname = MyVal; echo $TheObject-Bar($Objname, $Memname); ? Expected result: I expect it to output Test Actual result: -- Notice: Undefined variable: this in (filepath) on line 6 Notice: Trying to get property of non-object in (filepath) on line 6 -- Edit bug report at http://bugs.php.net/?id=33652edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33652r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33652r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33652r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=33652r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=33652r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33652r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33652r=needscript Try newer version: http://bugs.php.net/fix.php?id=33652r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33652r=support Expected behavior: http://bugs.php.net/fix.php?id=33652r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33652r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33652r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=33652r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33652r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=33652r=dst IIS Stability: http://bugs.php.net/fix.php?id=33652r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33652r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33652r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33652r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33652r=mysqlcfg