Depreciation notice error in PHPMyAdmin with 16.04 (Nginx)
Ok if you want to get rid of those nasty notices you have basically 4 options. You should note that the notices are caused by the oldish version of PHPMyAdmin that still uses some deprecated code, mainly old constructor definition statements. But they don't affect PHPMyAdmin as those statements still function but they should be changes as they will not work for eternity.
The fist one(recommended)
So the first one is to just turn off the notices for the PHPMyAdmin folder. You can do that by using the following commands:
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
Second One
You could change error_reporting
in php.ini, but there are many reasons you wouldn't want that.
Third One
Use a different source repo for PHPMyAdmin, again I think there are many reasons one would want to stick with the default PHPMyAdmin source repo. You can do this with the following commands:
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
Last one
You could change the files that generate the notices. Again I would not recommend this as this issue will probably be fixed later by Ubuntu. Anyway here are the changes you should do in this case:
sudo nano /usr/share/php/php-gettext/gettext.php
Line 48 StringReader Error.
Go to Line 52 and change
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
TO
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
Line 84 FileReader Error
Go to Line 90 and change
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
TO
function __construct($filename) {
Line 145 CacheFileReader error
Go to Line 146 and change
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
TO
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
sudo nano /usr/share/php/php-gettext/gettext.php
Line 36 gettext_reader { error
I think you get the gist now, go to line 101 and change
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart
TO
cd /usr/share/phpmyadmin
sudo touch .user.ini
echo "error_reporting = 0" | sudo tee -a .user.ini
sudo service nginx restart