#48786 [Opn->Bgs]: PCRE crashes Apache connection using xampp
| From: | pajoye@php.net | Date: | Fri, 03 Jul 2009 11:14:29 +0000 |
| Subject: | #48786 [Opn->Bgs]: PCRE crashes Apache connection using xampp | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139202@lists.php.net to get a copy of this message | ||
ID: 48786
Updated by: pajoye@php.net
Reported By: David dot Gausmann at measx dot com
-Status: Open
+Status: Bogus
Bug Type: PCRE related
Operating System: Windows XP SP3
PHP Version: 6CVS-2009-07-03 (CVS)
New Comment:
duplicate #47689
Previous Comments:
------------------------------------------------------------------------
[2009-07-03 11:03:53] David dot Gausmann at measx dot com
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 this bug report at http://bugs.php.net/?id=48786&edit=1