Re: Recovering from a hung regex
| From: | Ashley Sheridan | Date: | Mon, 25 May 2020 14:49:23 +0000 |
| Subject: | Re: Recovering from a hung regex | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327163@lists.php.net to get a copy of this message | ||
On May 25, 2020 2:35:54 PM UTC, Shivanand Sharma <shivanand@binaryturf.com> wrote:
>Hi Ashley: This is the first ever time I've joined an NNTP list for
>help.
>I'm using Gmail and learning as I go.
>
>Thanks Chris. Yes it's a PCRE bug. What I'm trying to find out is how
>to
>recover from such a hang and continue processing since this will be run
>in
>the background and as per schedule. Don't want one rogue file to hang
>the
>app. Are there any PHP core functions to take notice of this and throw
>exception and recover somehow? Or perhaps there's an alernative
>approach
>for execution of this specific preg_match statetment? Thanks.
>
>Regards,
>Shivanand Sharma
Are you sure it's a bug? What have you tried to limit the cause? Have you tried a reduced regex
or a smaller image?
As an alternative, have you looked at any alternatives to get the image Meta information?
Thanks,
Ash