The problem of preg_replace function under PHP5.2, Php5.2preg_replace
Preg_replace uses more than the php5.2 default allowed bytes, which is the size of Pcre.backtrack_limit and Pcre.recursion_limit.
discuz!6.0.0 official version of the program since the release, everyone is in full swing in the upgrade, but some plug-ins in 6.0, there is a problem
Like http://www.discuz.net/viewthread.php?tid=559133, the bank plugin.
White screen will appear after installing PHP for 5.2.0 and above
From the perspective of discuz! users, we need to assist plugin authors to solve this problem
The following is my resolution process, I hope to give you some suggestions
The first: This plug-in in 5.5 of the situation can be normal operation, but 6.0 white screen
discuz!6.0 in order to increase the readability of the template cache file, increased the indentation of the cache file, and did modify the part of the templates.func.php template processing part,
Is that the reason? I initially decided that this is 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: Suspect is bank.htm this template writing format problem, so I am very depressed to start analysis template, to tell the truth, template big analysis up really very headache. The result was clearly not found. More depressed to say
The second step: then found that the template is split, the normal execution, at this time I suspect that is not the correct match of the bug in the large amount of data when the error occurred, so I went to bugs.php.net began to search the http://bugs.php.net/search.php? C ... ace&x=3&y=5 here to find Ah find AH find, 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 unlimited
The reason why I write so detailed is to share with me the idea of solving the problem:)
http://www.bkjia.com/PHPjc/996223.html www.bkjia.com true http://www.bkjia.com/PHPjc/996223.html techarticle PHP5.2 The Preg_replace function problem, php5.2preg_replace preg_replace used more than the php5.2 default allowed bytes, that is Pcre.backtrack_ The size of limit and pcre.recursion_limit ask ...