#23053 [Fbk->NoF]: preg_match cause PHP overload the CPU
| From: | sniper@php.net | Date: | Wed, 09 Apr 2003 11:38:21 +0000 |
| Subject: | #23053 [Fbk->NoF]: preg_match cause PHP overload the CPU | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37426@lists.php.net to get a copy of this message | ||
ID: 23053
Updated by: sniper@php.net
Reported By: php at soundofos dot demon dot nl
-Status: Feedback
+Status: No Feedback
Bug Type: PCRE related
Operating System: windows 2000
PHP Version: 4.3.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-04-04 10:51:18] sniper@php.net
Please provide a self-contained example script.
(tested your script with using some random file and it works just
fine)
------------------------------------------------------------------------
[2003-04-04 09:09:24] php at soundofos dot demon dot nl
According to the documenmtation,preg_match can handle Arrays
But this will cause PHP to lock up the computer.
$regExp = "/((\/\*)+([\*]*\s*)+(\w+ *)+([\*]\s*(\*+\/{1}))+){1}/";
$file = file($obj->fileLocation);
$sql = preg_replace($regExp,"",$file);
I have tried imploding the array obtained from file() first
but the result was the same.
Maybe i should mention that PHP is running in CGI mode.
regards,
Ed Hofrichter
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23053&edit=1