RE: [PHP4BETA] PCRE problems
| From: | Daniel Landau | Date: | Thu, 13 Apr 2000 08:38:49 +0000 |
| Subject: | RE: [PHP4BETA] PCRE problems | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13488@lists.php.net to get a copy of this message | ||
I'm using PHP4 RC1.
-Daniel
> -----Original Message-----
> From: Andrei Zmievski [mailto:andrei@ispi.net]
> Sent: Wednesday, April 12, 2000 6:37 PM
> To: Daniel Landau; php4beta@lists.php.net
> Subject: Re: [PHP4BETA] PCRE problems
>
>
> At 04:01 PM 4/12/00 -0700, Daniel Landau wrote:
> >I'm using the PCRE to perform some fairly heavy regexp work using
> >preg_replace with the e, i and s flags set in the search pattern, for
> >instance:
> >
> >$pattern = '/(<IMG SRC=")([^"]+)"/eisU';
> >$html = preg_replace($pattern, "'\\1' . absoluteImage('\\2',
> '$this->url',
> >'$server') . '\"'", $html);
> >
> >I'm finding that SOMETIMES a series of this along with similar operations
> >generates this error:
> >
> >FATAL: emalloc(): Unable to allocate 1077909393 bytes
> >[Wed Apr 12 13:04:05 2000] [notice] child pid 1361 exit signal
> Segmentation
> >fault (11)
> >
> >At other times I encounter no problems. Sometimes turning off
> the 's' flag
> >on the pattern fixes the problem, at other times eliminating one
> or another
> >of the replace operations in the series fixes the problem. I'm
> baffled, and
> >hoping that someone can suggest a permanent fix.
>
> Which version of PHP are you using? If it's beta 3 or earlier, then it's a
> bug that has been fixed in the later versions.
>
> -Andrei
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>