问题
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