This article mainly introduced the PHP5.2 under the Preg_replace function question, needs the friend may refer to under
Preg_replace uses more than the php5.2 default allowed Byte, which is the size of the Pcre.backtrack_limit and Pcre.recursion_limit.
discuz!6.0.0 official version of the program since the release, everyone is in the middle of the upgrade, but some plug-ins in 6.0 under the problem
Like http://www.discuz.net/viewthread.php?tid=559133, the bank plugin.
In PHP for 5.2.0 and above the installation will appear after the problem of white screen
From the perspective of discuz! users, we need to assist the plugin author to solve this problem
The following is my resolution process, I hope to give you some suggestions
First: This plug-in in 5.5 of the case can be normal operation, but 6.0 under the white screen
discuz!6.0 in order to increase the readability of the template cache file, increased the indentation of the cached file, but did modify some templates.func.php template processing parts,
Is that the reason? I initially identified the problem here, because the 5.5 part of the code to replace the modified code, the performance is normal, but very depressed did not find the reason
The second step: suspicion is bank.htm this template writing format problem, so I am very depressed to start analysis template, to tell the truth, the template big analysis really very headache. The result obviously did not find the reason. More depressing to say
The second step: then found that the template split after the normal execution, at this time I initially suspect that the bug is not a regular match in the large amount of data when the error occurred, so I bugs.php.net began to search the http://bugs.php.net/search.php? C ... ace&x=3&y=5 here looking for and looking, so finally found here http://bugs.php.net/bug.php?id= 39405, suddenly found unexpectedly is 5.2 configuration problem, after adjusting the big pcre.backtrack_limit and pcre.recursion_limit problem solved
It is said that Pcre.backtrack_limit=-1 in php.ini
is unrestricted
The reason for writing so detailed is to share with me the idea of solving the problem: