ID: 38594 Updated by: [EMAIL PROTECTED] Reported By: o dot veujoz at free dot fr -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: Windows XP PHP Version: 5.1.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-08-25 17:08:17] o dot veujoz at free dot fr Description: ------------ Since php 5.1.5 & 5.1.6 the following piece of code cause a server crash, either on IIS 5.1 / Apache 2.0.59 (under windows XP, not tried on other platform). The regexp is from Pear::Wiki_Text library and was working with older PHP versions (including 5.1.4). Under IIS, I've got the message : "PHP has encountered a Stack overflow" No message with Apache... I read a lot of things on this error (such as bad regexp writing), but this time it is not a specific IIS case. Removing the PCRE_DOTALL regexp option and the script works (but the result is not what expected...). I read the bug #28317 and was wondering if it wasn't the same compilation problem ("Thus NO_RECURSE should be set in win32 compiler options"). Best regards, Olivier (from France, sorry for the spelling faults) Reproduce code: --------------- <?php // Uncomment one line and it works again ?? $text = '<code type="php"> include_once("adodb/session/adodb-session2.php"); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); ADOdb_Session::config($driver=\'mysql\', $host, $user, $password, $database,$options=false); session_start(); </code>'; $regex = ';^<code(\s[^>]*)?>((?:(?R)|.)*?)\n</code>(\s|$);msi'; preg_match_all($regex, $text, $match); print '<xmp>'; print_r($match); print '</xmp>'; ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38594&edit=1