Edit report at http://bugs.php.net/bug.php?id=52990&edit=1
ID: 52990 Updated by: ahar...@php.net Reported by: sarun37823 at bigfoot dot com Summary: PHP crash when PCRE exceed recursion limit. -Status: Open +Status: Duplicate Type: Bug Package: PCRE related Operating System: *nix PHP Version: 5.2.14 Block user comment: N New Comment: Duplicate of an absolute tonne of bugs; most recently bug #52818. Previous Comments: ------------------------------------------------------------------------ [2010-10-05 07:44:45] sarun37823 at bigfoot dot com Description: ------------ Hello, I've got "Zero Sized Reply" when I try to replace a long string with PCRE. Test script: --------------- <?php $strtest=''; for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254)); $strtest.='B'; for($i=0; $i<1024*512; $i++)$strtest.=chr(rand(1, 254)); $strtest.='signature'; for($i=0; $i<1024; $i++)$strtest.=chr(rand(1, 254)); preg_replace('/b(?:.(?!signature))*.(sig.+)/sim', 'null${1}', $strtest); ?> Expected result: ---------------- blank page Actual result: -------------- ERROR The requested URL could not be retrieved While trying to retrieve the URL: ******* The following error was encountered: Zero Sized Reply Squid did not receive any data for this request. Your cache administrator is *******. Generated Tue, 05 Oct 2010 05:28:19 GMT by ******* (squid/2.7.STABLE3) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52990&edit=1