I have Ubuntu 16.04 LTS running with PHP7 and phpmyadmin installed. However, I get a lot of deprecation notices like:
Depre
You didn't mention which version of phpMyAdmin you're using or from where it was installed, but it seems to either be the Ubuntu packaged version 4.5.4.1 or a rather old and unsupported version from source. Either way, I believe your issue was reported (and fixed) at https://github.com/phpmyadmin/phpmyadmin/issues/11462 -- if you're using the Ubuntu packaged version, the comments there suggest that the nijel PPA version should work better for you.
Of course, Beniamin Pantiru's accepted answer is good, too, and if you're running a production server you should reduce the number of warnings and errors displayed by PHP anyway as a standard best practice.
Problem arises when there's a mismatch between the original PHP version you were running previously and your current PHP server version. Depending on your installed PHP version, this should be enough.
sudo apt-get update
sudo apt-get install phpmyadmin php7.0-gettext php7.0-mbstring -y
I had the same problem and none of the solution proposed here worked.
My configuration was Ubuntu 16.04 and php 7.
I solved the issue reinstalling phpmyadmin to last version (5.02). The process is pretty simple. Backup your phpmyadmin folder ('/usr/share/phpmyadmin/' to '/usr/share/phpmyadmin.bak/') by renaming it, create another folder '/usr/share/phpmyadmin/', download the last version of phpmyadmin and copy files inside the newly created folder '/usr/share/phpmyadmin/'. Your version is now upgraded. In my case, deprecation notice vanished.
The process could raise a pair of other errors that you can get rid of by following this guide https://devanswers.co/manually-upgrade-phpmyadmin/
Updating the server worked for me with sudo apt-get dist-upgrade and then restarting apache.
I think that this issue is caused by not updating phpmyadmin frequently enough.
at last I solved this problem permanently.
Find your php.ini file in your server. It should be in /etc/php/7.0/apache2 folder
open it with nano
nano /etc/php/7.0/apache2/php.ini
Find (ctrl+w) upload_max_filesize = 2M (default) in php.ini file
change default value to 50M or 100M or 20M as you wish.
Save and restart apache2 service
service apache2 restart
and please tell me your satisfactions :-)
Dear @BeniaminPantiru your answer is correct but your solution is not solve the problem because you are telling the Apache to don't show the deprecation errors rather than fix the errors. but we can easily fix this error by upgrade the necessary security updates and packages. type the following command will solve the problem.
sudo apt-get dist-upgrade