From: php at soundofos dot demon dot nl
Operating system: windows 2000
PHP version: 4.3.1
PHP Bug Type: *Regular Expressions
Bug description: preg_match cause PHP overload the CPU
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 bug report at http://bugs.php.net/?id=23053&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23053&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23053&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23053&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23053&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23053&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23053&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23053&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23053&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23053&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23053&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23053&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23053&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23053&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23053&r=gnused