I get PHP4TS.dll crashes when I do a preg_match_all. The problem seems to occur when my data string becomes too long. As far as I can see the limit is 2163. As I need to match strings that are longer this is a serious problem to me.
A sample PHP program that gets this error is:
<?php
$data=" <tr ";
for($i=0;$i<217;$i++)
$data .="xxxxxxxxxx";
$matcher = "/<tr (((?!<\/table).)*)/i"; // up to end of link table
echo strlen($data);
preg_match_all($matcher,$data,$matches);
return;
?>
The problem occurs both when the lookahead is never finished (as in the example) and when the loohahead finishes too late so that the matching string become longer as 2162.
I am working in Windows ME with Apache, MySQL and the newest version of PHP. Yesterday I updated my PHP from 4.2 but the problem became only worse.
Is there a way to work around this problem?
Thanks,
Wim