_php tutorial on preg_replace function under PHP5.2

Source: Internet
Author: User
Tags php template

Preg_replace used more than php5.2 default allowed bytes
That 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

The reason why I write so detailed is to share with me the idea of solving the problem:)

http://www.bkjia.com/PHPjc/508224.html www.bkjia.com true http://www.bkjia.com/PHPjc/508224.html techarticle 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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.