0

Just installed myphpadmin on a new pc. Now with every page I visit, I see lots of deprecation notices (related to mcrypt functions).

I already tried setting

error_reporting = E_ALL & ~E_DEPRECATED

in php.ini and restarted Apache (and in fact, my pc), but that didn't help. I know PHP is using that php.ini file - I had to enable the mbstring extension in that same file earlier. Also, there are no duplicate error_reporting lines in that file.

I'm using PHP 7.1.0 (Windows) and phpMyAdmin 4.6.5.2

How do I get rid of those notices?

3
  • 1
    Could you include the actual message you're getting? As ´mcrypt` is depracted you could try (see one of the answers) to not load the module and try to use phpMyAdmin afterwards. It doesn't seem like there is still a requirement for it. You might have to enable the OpenSSL extension though.
    – Seth
    Commented Jan 11, 2017 at 10:49
  • There is no mcrypt module as it is statically linked. But enabling openSSL seemd to fix it - no more messages.
    – YvonRozijn
    Commented Jan 20, 2017 at 8:27
  • So what did fix it? The proper setup of OpenSSL or the change to the error handling file? Consider posting the solution as an answer and accepting it. If possible with additional information that might be relevant.
    – Seth
    Commented Jan 20, 2017 at 8:51

2 Answers 2

0

Firstly check that you are looking at the right php.ini file. You can create a simple .php file with the following code to check your installation:

<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>

Look for the the setting "Loaded Configuration File" this will give you the path to where php.ini is located on your PC.

Once you have found php.ini, open it up and uncomment the following line to load the mcrypt extension.

extension=php_mcrypt.dll

You may have to restart Apache afterwards.

3
  • Yes, I am using the correct php.ini file.
    – YvonRozijn
    Commented Jan 20, 2017 at 8:18
  • And no such luck - as of PHP 5.3, mcrypt is statically linked, so there is no php_mcrypt.dll. I 'fixed' it by editing phpmyadmin's ErrorHandler.php, and skip error reporting if its an E_DEPRECATED type error.
    – YvonRozijn
    Commented Jan 20, 2017 at 8:20
  • And sorry for the delay - StackExchange only bothered to notify me of your reply after 9 days (!) - and sorry fot the separate messages, as it was sent already by hitting the enter key.
    – YvonRozijn
    Commented Jan 20, 2017 at 8:22
0

As suggested by Seth, I enabled the OpenSSL extension, and that got rid of the deprecation messages.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .