简体   繁体   English

Joomla-用php =>空白页生成的很多代码

[英]Joomla - much code generated with php => blank page

I use Jumi to unsert custom php to joomla articled. 我使用Jumi将自定义php插入joomla文章。

function generateTR($tr_nr) {
    $html="";
    for ($i=0; $i<$tr_nr; $i++) {
        $m=memory_get_usage();
        $html.="<tr><td colspan='5'>$i - $m</td></tr>";
    }
    return $html;
}


echo "<table><tbody>".generateTR(20000)."</tbody></table>";

If I run this code (generateTR(20000)) through jumi => I get blank page. 如果我通过jumi =>运行此代码(generateTR(20000)),则会得到空白页。 And if I run it directly by accessing php file => it's displaying the table OK. 如果我直接通过访问php file =>运行它,则显示的是OK。

And if change number of rows to 2000 => generateTR(2000) => it will show OK the table inside the joomla article through jumi. 并且,如果将行数更改为2000 => generateTR(2000)=>,它将通过jumi将OK显示在joomla文章中的表中。

Why when I increase the amount of html code => joomla + jumi cannot handle it? 为什么当我增加html代码的数量=> joomla + jumi无法处理它时,为什么? Also I tried sourcerer instead of jumi => same problem. 我也尝试了sourcerer而不是jumi =>同样的问题。

Is there any solution? 有什么解决办法吗?

Thanks. 谢谢。

EDIT: I tried to increase max_execution_time to 180 sec; 编辑:我试图将max_execution_time增加到180秒; and also memory_limit to 2000M 以及memory_limit到2000M

EDIT2: No errors in logs... EDIT2:日志中没有错误...

with

error_reporting(E_ALL | E_STRICT);
ini_set("display_errors", 1);

got some errors but not related to that problem... because when with few tr rows the errors are the same and the table is displayed OK. 出现了一些错误,但与该问题无关...因为当tr行很少时,错误是相同的,并且表显示为OK。

在开头添加

set_time_limit(0);

The cause of the blank page is "System - SEF" plugin. 空白页的原因是“ System-SEF”插件。 Here is the bug - http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24865 该错误-http: //joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24865

You will get blank page in Joomla 1.5. 您将在Joomla 1.5中获得空白页。

In Joomla 2.5 you will get "500 - PHP regular expression limit reached (pcre.backtrack_limit)" 在Joomla 2.5中,您将获得“ 500-PHP正则表达式限制(pcre.backtrack_limit)”

This is same bug. 这是同样的错误。

2 solutions: 2个解决方案:

1) disable "System - SEF" plugin, if you don't need SEF 1)如果您不需要SEF,请禁用“系统-SEF”插件

2) if you need SEF - 2)如果您需要SEF-

add

ini_set('pcre.backtrack_limit',1000000);

or 要么

ini_set('pcre.backtrack_limit',1000000);
ini_set('pcre.recursion_limit',1000000);

to index.php of your template. 到模板的index.php。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM