【问题标题】:PHP "Crypt_Blowfish" Class Initiating Errors? [duplicate]PHP“Crypt_Blowfish”类启动错误? [复制]
【发布时间】:2013-05-12 02:55:30
【问题描述】:

我的 PHP Crypt_Blowfish 类初始化抛出以下错误:

错误:

Strict Standards: Non-static method PEAR::raiseError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish/MCrypt.php on line 155 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish.php on line 199 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /usr/share/pear/Crypt/Blowfish.php on line 142

简单代码:

<?php
include_once('/usr/share/pear/Crypt/Blowfish.php');
$cipher = new Crypt_Blowfish("_mysalt_");
?>
  • 是因为include吗?但是,当我禁用 include 时,它再次给出:

错误: Fatal error: Class 'Crypt_Blowfish' not found in /var/www/html

请问有什么严重的问题?

  • 现在我很困惑,请问如何使用Crypt_Blowfish 类? (我是否正确启动它或者是否有任何其他标准方式来使用/启动它?)
  • 或者,使用该类有什么要求? (我已经在我的 RHEL 上运行了这两个安装。yum install php-pear-Crypt-Blowfishyum install perl-Crypt-Blowfish。Apache 重新启动。我还缺少什么吗?)

请帮忙!

【问题讨论】:

    标签: php linux pear mcrypt blowfish


    【解决方案1】:

    严格标准警告是 no 错误。您可以轻松地将它们从您的 error_reporting 设置中删除:

    error_reporting(error_reporting() & ~E_STRICT);
    

    【讨论】:

    • 没有错误?如果是这样,我想知道为什么代码不起作用?
    猜你喜欢
    • 2013-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-11-12
    • 2011-08-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多