【问题标题】:Joomla - much code generated with php => blank pageJoomla - 使用 php => 空白页面生成的许多代码
【发布时间】:2013-04-26 20:28:41
【问题描述】:

我使用 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>";

如果我通过 jumi 运行此代码 (generateTR(20000)) => 我会得到空白页。 如果我通过访问 php 文件直接运行它 => 它会显示表格 OK。

如果将行数更改为 2000 => generateTR(2000) => 它将通过 jumi 显示 joomla 文章中的表格。

为什么当我增加 html 代码量 => joomla + jumi 无法处理? 我也尝试了 sourcerer 而不是 jumi => 同样的问题。

有什么解决办法吗?

谢谢。

编辑: 我试图将 max_execution_time 增加到 180 秒;还有 memory_limit 到 2000M

编辑2: 日志中没有错误...

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

出现了一些错误,但与该问题无关...因为当 tr 行数很少时,错误是相同的,并且表格显示正常。

【问题讨论】:

  • 可能会遇到执行时间限制或内存限制。
  • 编辑:我尝试将 max_execution_time 增加到 180 秒;还有 memory_limit 到 2000M
  • 错误日志中是否有任何错误?
  • 开启 display_errors 和 error_reporting。不要在黑暗中调试。
  • 马克:我试过 error_reporting(E_ALL | E_STRICT); ini_set("display_errors", 1);但那里没有相关错误。

标签: php joomla


【解决方案1】:

在开头添加

set_time_limit(0);

【讨论】:

    【解决方案2】:

    空白页的原因是“系统-SEF”插件。 这是错误 - http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24865

    您将在 Joomla 1.5 中获得空白页面。

    在 Joomla 2.5 中,您将收到“500 - PHP 正则表达式限制已达到 (pcre.backtrack_limit)”

    这是同样的错误。

    2 个解决方案:

    1) 如果您不需要 SEF,请禁用“System - SEF”插件

    2) 如果你需要 SEF -

    添加

    ini_set('pcre.backtrack_limit',1000000);
    

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

    到你的模板的 index.php。

    【讨论】:

      猜你喜欢
      • 2014-06-30
      • 2013-12-19
      • 2013-12-29
      • 1970-01-01
      • 1970-01-01
      • 2011-05-27
      • 2012-04-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多