开发者

preg_match_all crashing/bugging?

Okay, so I have this script that has been the same for at least 3 months now. The code hasn't been modified at all. Nor has my server (VPS) been modified either. But now out of nowhere, started about 24 hours ago, a line in the script is causing the page/script to timeout/crash (white page after about 30 seconds).

The line of code in question is this:

$string = preg_match_all('/\[img\]([^\'"\[\]]+)\[\/img\]/is', substr($pag['page_text'], 0, 1024开发者_如何学Python), $matches);

If I comment that line out the page loads fine. The thing is that line is critical to the page. Does anyone know why the preg_match_all function would cause a page to crash? Especially since I haven't changed anything on the server or script..


The size of the string and the regex capturing might be affecting your memory_limit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜