ID: 48907 Updated by: j...@php.net Reported By: sworddragon2 at aol dot com -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: Windows XP Professional SP3 PHP Version: 5.3.0 New Comment:
Check for these in your php.ini: [Pcre] ;PCRE library backtracking limit. ; http://php.net/pcre.backtrack-limit ;pcre.backtrack_limit=100000 ;PCRE library recursion limit. ;Please note that if you set this value to a high number you may consume all ;the available process stack and eventually crash PHP (due to reaching the ;stack size limit imposed by the Operating System). ; http://php.net/pcre.recursion-limit ;pcre.recursion_limit=100000 Previous Comments: ------------------------------------------------------------------------ [2009-07-16 00:56:14] sworddragon2 at aol dot com I'm using PHP 5.3.0 x86 VC6 Thread Safe. I have installed PHP 5.2.10 and can reproduce it too. After this i have installed PHP 5.3.0 again without any extensions and have used a standard php.ini and httpd.conf (just the entry from the PHP installer is written). I have cleared the error.log from Apache and after executing the reproduce code the log says: [Thu Jul 16 02:40:03 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting. httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName [Thu Jul 16 02:40:03 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Thu Jul 16 02:40:03 2009] [notice] Server built: Dec 10 2008 00:10:06 [Thu Jul 16 02:40:03 2009] [notice] Parent: Created child process 3196 httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.2 for ServerName [Thu Jul 16 02:40:03 2009] [notice] Child 3196: Child process is running [Thu Jul 16 02:40:03 2009] [notice] Child 3196: Acquired the start mutex. [Thu Jul 16 02:40:03 2009] [notice] Child 3196: Starting 64 worker threads. [Thu Jul 16 02:40:03 2009] [notice] Child 3196: Starting thread to listen on port 80. But i figured out another thing. If I'm changing the pattern from '#a((?:.|\n)*?)a#' to '#a((?:\n|.)*?)a#' all works fine. Oddly seems that Avira AntiVir Personal with the definition file from the last days and today says after saving the reproduce code that the file is a heuristic found HEUR/HTML.Malware. ------------------------------------------------------------------------ [2009-07-15 12:08:40] j...@php.net Exactly what PHP version are you using? This works fine on both 5.2.10 and 5.3.0 for me.. ------------------------------------------------------------------------ [2009-07-13 19:35:00] sworddragon2 at aol dot com Description: ------------ I found a regular expression with which i can restart the apache service with the notification: [notice] Parent: child process exited with status 3221225477 -- Restarting. I'm using Apache 2.2.11. Reproduce code: --------------- <?php preg_replace('#a((?:.|\n)*?)a#','a$1a','a11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111a'); ?> Expected result: ---------------- I expected that preg_replace() repaces the string. Actual result: -------------- Apache restarts with the above message an Firefox 3.5 tells me that the connection to the server was recessed. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48907&edit=1