PHP“Crypt_Blowfish”类启动错误?

时间:2013-05-17 02:40:08

标签: php linux pear mcrypt blowfish

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

请帮忙!

1 个答案:

答案 0 :(得分:0)

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

error_reporting(error_reporting() & ~E_STRICT);