ID: 38728 Updated by: [EMAIL PROTECTED] Reported By: doktor at farlep dot net -Status: Open +Status: Bogus Bug Type: *Regular Expressions Operating System: Linux Slackware 9.1.0 PHP Version: 4.4.4 New Comment:
We can't fix something we're unable to reproduce. Please provide a short reproduce case. Until then -> bogus. Previous Comments: ------------------------------------------------------------------------ [2006-09-06 13:41:55] doktor at farlep dot net I am sorry, but I don't write or attach script, beacose this code from forum phpBB (file includes/bbcode.php). This forum has very much lines of code ;) I am only change property \w on \pL\Sm in 6 functions in this file and apache server memory leak. If I change properties back on \w and restart apache - all work fine. I'm talk with phpBB-developers and they says what this bug in php and recommended usage function mb_eregi_replace() instead of preg_replace() ps: sorry for my bad english :( ------------------------------------------------------------------------ [2006-09-06 08:38:30] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2006-09-05 21:41:20] doktor at farlep dot net Description: ------------ usage unicode character properties \pL and \Sm in function preg_replace give apache memory leak. (apache compilled with libphp4.a) linux load average up to 98 Reproduce code: --------------- $patterns[] = "#\[url=([\pL]+?://[(\pL\Sm\#$%&~/.\-;:=,[EMAIL PROTECTED])\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; $text = preg_replace($patterns, $replacements, $text); Expected result: ---------------- replacing unicode characters in bbcode ( work fine with \w property, but in utf mode with values greater than 128 never match) Actual result: -------------- memory leak load average: 98.3 fixed - not usage \pL and \Sm in preg_replace and restarting apache server ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38728&edit=1