PHP CRYPT_BLOWFISH Error?

五迷三道 提交于 2019-12-13 04:29:08

问题


I'm on Redhat and using PHP Crypt_Blowfish and having following error.

ERROR:

Notice: Constant CRYPT_BLOWFISH_AUTO already defined in /usr/share/pear/Crypt/Blowfish.php on line 33 Notice: Constant CRYPT_BLOWFISH_MCRYPT already defined in /usr/share/pear/Crypt/Blowfish.php on line 38 Notice: Constant CRYPT_BLOWFISH_PHP already defined in /usr/share/pear/Crypt/Blowfish.php on line 43 Fatal error: Cannot redeclare class Crypt_Blowfish in /usr/share/pear/Crypt/Blowfish.php on line 88

My code is just something like:

include_once('Blowfish.php');
$key = '12345678';
$cipher = new Crypt_Blowfish($key);
echo Eencrypt($cipher, "hello world!");

And when i check my php.ini, the mcrypt is also already installed and enabled.

  • What went seriously wrong please?

回答1:


Strict standards warnings are no errors. You can remove them from your error_reporting setting easily:

error_reporting(error_reporting() & ~E_STRICT);


来源:https://stackoverflow.com/questions/16585127/php-crypt-blowfish-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!