|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23053 preg_match cause PHP overload the CPU
Submitted: 2003-04-04 09:09 UTC Modified: 2003-04-09 06:38 UTC
From: php at soundofos dot demon dot nl Assigned:
Status: No Feedback Package: PCRE related
PHP Version: 4.3.1 OS: windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-04-04 09:09 UTC] 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.


Ed Hofrichter


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-04 10:51 UTC]
Please provide a self-contained example script.
(tested your script with using some random file and it works just fine)

 [2003-04-09 06:38 UTC]
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.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Mar 27 10:03:37 2023 UTC