ID:               38728
 Updated by:       [EMAIL PROTECTED]
 Reported By:      doktor at farlep dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         *Regular Expressions
 Operating System: Linux Slackware  9.1.0
 PHP Version:      4.4.4
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to