#40630 [Opn]: preg_match_all with a particular regexp causes run-away php/apache process

From: Date: Mon, 26 Feb 2007 18:18:31 +0000
Subject: #40630 [Opn]: preg_match_all with a particular regexp causes run-away php/apache process
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-109589@lists.php.net to get a copy of this message
ID: 40630 User updated by: mfburdett at gmail dot com Reported By: mfburdett at gmail dot com Status: Open Bug Type: PCRE related Operating System: FreeBSD 6.2 PHP Version: 5.2.1 New Comment: I tested cli php5.2-200702261730 and the issue appears to be resolved in that snapshot. Previous Comments: ------------------------------------------------------------------------ [2007-02-26 18:07:25] mfburdett at gmail dot com Same issue running the script via PHP commandline. Am installing snapshot in home directory now. ------------------------------------------------------------------------ [2007-02-26 16:46:19] tony2001@php.net Does PHP CLI work for you? What kind of Apache are you using? Version? MPM? Can you provide a GDB backtrace? Can you try building the snapshot (doesn't matter where, you don't have to install it, just build it and run the script using sapi/cli/php). ------------------------------------------------------------------------ [2007-02-26 16:36:22] mfburdett at gmail dot com <?php $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; $string = ''; preg_match_all($regexp, $string, $matches); ?> ------------------------------------------------------------------------ [2007-02-26 16:35:11] tony2001@php.net Notice: Undefined variable: string ------------------------------------------------------------------------ [2007-02-26 16:32:14] mfburdett at gmail dot com <?php $regexp = '%(?:^|,\ *)("(?>[^"]*)(?>""[^"]* )*"|(?: [^",]*))%x'; preg_match_all($regexp, $string, $matches); ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/40630 -- Edit this bug report at http://bugs.php.net/?id=40630&edit=1

« previous php.bugs (#109589) next »