Is there some kind of PHP configuration setting that would affect the length of string being passed into preg_match or preg_match_all?
I have the following which I am trying to test to work out what is going wrong for me:
$re = "/\[\[section\:(.*?)\]\]((.|\n)*?)\[\[endsection\]\]/";
$str = "[[section:body]]
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
lots of lines here
[[endsection]]
other stuff here";
preg_match_all($re, $str, $matches);
var_dump($matches);
Now if I run that it's fine, it returns the results pretty much instantly.
But if I add one more line to the $str variable and run it again, it just spins and spins and then I get web page cannot be displayed.
But if I then run that exact same thing on writecodeonline.com/php it works fine and returns instantly.
I'm not getting any errors in my php error log or my apache error logs, it just refuses to do anything once it hits that certain characters (it seems to be that as soon as it hits 707 characters it stops responding.
Has anyone come across this sort of issue before? Is it just some configuration setting I need to change?
Cheers.