phpMyAdmin mcrypt error on PHP7.1

2020-02-15 09:58发布

问题:

Apache/2.4.23 (Win64) PHP/7.1.0

PhpMyAdmin: 4.6.5.2

Error Image:

Any idea?

回答1:

This was a problem regarding compatibility with such a new PHP version, technically with the library function that phpMyAdmin uses for various encryption functions.

The problem was fixed in phpMyAdmin and will be part of the next release (which will be phpMyAdmin 4.6.6)



回答2:

Just to add to Alex's answer, the code has a typo which makes it invalid, it should look like this:

public function handleError($errno, $errstr, $errfile, $errline)
{
    if (error_reporting() == 0 || $errno == E_DEPRECATED) { // added – $errno == E_DEPRECATED
        return;
    }
    $this->addError($errstr, $errno, $errfile, $errline, true);
}


回答3:

in php.ini error_reporting = E_ALL & ~E_DEPRECATED

If does not work, that is, the hard method – change code phpMyadmin. set_error_handler in phpMyadmin does not take into account error_reporting.

To exclude E_DEPRECATED, in ../phpMyadmin/libraties/ErrorHandler.php

change this method

public function handleError($errno, $errstr, $errfile, $errline)
{
if (error_reporting() == 0 || $ Errno == E_DEPRECATED) { // added – $errno == E_DEPRECATED
return;
}

$this->addError($errstr, $errno, $errfile, $errline, true);
}