PHP“Crypt_Blowfish"类初始化错误


PHP "Crypt_Blowfish" Class Initiating Errors?

我的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重新启动。我还错过了什么吗?)

请帮忙!

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

error_reporting(error_reporting() & ~E_STRICT);