From: David dot Gausmann at measx dot com Operating system: Windows XP SP3 PHP version: 6CVS-2009-07-03 (CVS) PHP Bug Type: PCRE related Bug description: PCRE crashes Apache connection using xampp
Description: ------------ Hello, this Bugs seems to be similiar to http://bugs.php.net/bug.php?id=38512 My php version is 5.2.9 (because the current xampp version seems not to include a newer one). I've tried to replace the php files in the xampp installation, but it results in a crash. Please don't be angry that I've chosen a wrong php version here. I'm using PCRE to evaluate VBS source codes. To do this I use the current xampp version (1.7.1 / win32). During the evaluation process I've modified a regular expression. After that my browser told me "the server has reset the connection". As you can see the string (which shall be evaluated) is very long. I found out that error depends on three things: 1. The length of the evaluation string 2. The |"" in the pattern (which is wrong for VBS evaluation, but it was a test) 3. The "\'" in the evaluation string If the pattern whould be wrong then only a php error should occur. An other interesting fact is that the php script works fine if I execute the script with the php.exe directly. Hence the error depends on the combination apache - php - pcre I've already reported this bug to PCRE, but they said I should report it here. Kind Regards David Gausmann (Bananen-Joe) Reproduce code: --------------- $sContent = 'Call ABCDEFGHJIKLMNOPQRSTUVWXYZ("Lorem Ipsum dolor sit amet, consectetuer elitr\'" & VARIABLE & "\'" & vbCRLF & vbCRLF & "Lorem ipsum dolor sit amet conset" & vbCRLF & vbCRLF & "Lorem ipsum dolor sit amet consectetuer sadipscing.")'; echo preg_match('/^(?:[^"]|"(?:[^"]|"")*")*(?:var_alloc)\s*\(?\s*"[^"]+".*$/i', $sContent); Expected result: ---------------- preg_match should return 0 (no match) Actual result: -------------- The apache aborts the connection -- Edit bug report at http://bugs.php.net/?id=48786&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48786&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48786&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48786&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48786&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48786&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48786&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48786&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48786&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48786&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48786&r=support Expected behavior: http://bugs.php.net/fix.php?id=48786&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48786&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48786&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48786&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48786&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48786&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48786&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48786&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48786&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48786&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48786&r=mysqlcfg