致命错误:在第60行的/library/Cube/Config/Xml.php中调用未定义的函数Cube \ Config \ simplexml_load_file()

时间:2015-07-25 00:36:43

标签: php xml apache centos5 ioncube

我正在安装PHPProBid拍卖脚本,突然间我收到了这个错误:

致命错误:在第60行的/home/admin/webserendibite.ir/library/Cube/Config/Xml.php中调用未定义的函数Cube \ Config \ simplexml_load_file()

配置:CentOS 5,Apache httpd,php 5.6,froxlor面板 php信息页面:http://www.webserendibite.ir/phpInfo.php ionloader安装程序页面:http://webserendibite.ir/ioncube/loader-wizard.php

这是这个功能:

/ ** * *将输入转换为\ SimpleXMLElement,然后将xml处理为数组 * * @param mixed $ input输入变量,它可以是xml文件的路径,xml格式的字符串或类型为\ SimpleXMLElement的对象 * @return \ Cube \ Config \ Xml * /

public function setData($input)
{
    $xml = null;

    if ($input instanceof \SimpleXMLElement) {
        $xml = $input;
    }

    else if (file_exists($input)) {
        $xml = simplexml_load_file($input);

    }

    else {
        $xml = simplexml_load_string($input);
    }

    $this->_data = json_decode(json_encode((array)$xml), 1);

    return $this;
}

我感谢任何帮助:)

3 个答案:

答案 0 :(得分:1)

看起来您的服务器缺少SimpleXML PHP扩展。如果您可以在此服务器上安装软件包(通过命令行或其他方式),请查找名为php-simplexmlphp-xml的软件包。当您在phpinfo页面或SimpleXML的命令行输出中看到php -m扩展名时,您将解决该问题。

作为旁注,我不认为暴露你的phpinfo,特别是ioncube loader页面是一个好主意,特别是如果你的应用程序将在同一台服务器上运行。我建议尽快限制对这些网页的访问。

答案 1 :(得分:0)

最后一次尝试访问该页面的错误日志:[Sat Jul 25 21:44:01 2015] [notice]抓住了SIGTERM,关闭了 加载失败/usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so:/usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so:undefined symbol:execute [星期六7月25日21:45:43] [通知] suEXEC机制启用(包装器:/ usr / sbin / suexec) [星期六7月25日21:45:43] [警告] RSA服务器证书通配符CommonName(CN)*.lxlabs.com' does NOT match server name!? [Sat Jul 25 21:45:43 2015] [notice] Digest: generating secret for digest authentication ... [Sat Jul 25 21:45:43 2015] [notice] Digest: done [Sat Jul 25 21:45:44 2015] [warn] RSA server certificate wildcard CommonName (CN) *。lxlabs.com'与服务器名称不匹配!? [星期六7月25日21:45:44] [通知] Apache / 2.2.27(Unix)DAV / 2 PHP / 5.6.11 mod_ssl / 2.2.27配置OpenSSL / 0.9.8e-fips-rhel5 - 恢复正常操作

答案 2 :(得分:0)

我尝试在phpprobid中创建新控制器,但出现错误404错误

找不到您要查找的页面。

尝试检查错误的网址,然后点击浏览器上的刷新按钮。

这是我休会的过程

**//created route**
  'app-test'         => array(
        'test',
        array(
            'controller' => 'test',
            'action'     => 'index',
        ),
    ),


 **//controller**

namespace App\Controller;

use Ppb\Controller\Action\AbstractAction,
Cube\Controller\Front,
Cube\View,
Cube\Validate\Url as UrlValidator,
Cube\Controller\Request,
Ppb\Service;


class Test extends AbstractAction
{
public function Index()
{
    die('ok');
}
public function test()
{
    die('ok');
}
}

谢谢