I am getting errors when I launch phpmyadmin in 16.04:

Deprecation Notice in ./../php/php-gettext/streams.php#48


./../php/php-gettext/gettext.inc#41: require()
./libraries/select_lang.lib.php#477: require_once(./../php/php-gettext/gettext.inc)
./libraries/common.inc.php#569: require(./libraries/select_lang.lib.php)
./index.php#12: require_once(./libraries/common.inc.php)

It continues with these as well with the same backtrace as above:

Deprecation Notice in ./../php/php-gettext/streams.php#84
Deprecation Notice in ./../php/php-gettext/streams.php#145
Deprecation Notice in ./../php/php-gettext/gettext.php#36

I have updated and verified that I am on the latest gettext and mbstring. Any thoughts on resolving?

  • On this tutorial it says that you have to enable mcrypt and mbstring php modules and restart apache. Did you do that? – bistoco Jul 7 '16 at 21:39
  • yes I updated mcrypt and mbstring and have restarted apache. – tseward Jul 13 '16 at 15:30
  • I will recommend [download the package directly ](phpmyadmin.net/downloads) that fits your php/mysql versions, to troubleshot. – bistoco Jul 18 '16 at 15:38

This depends whether you are adventurous enough. If you understand the error, it means your PHP has some old class constructors.

OLD Php Class Constructor

Class myclassname {

    function myclassname() {
      //This is a constructor

New Php Class Constructor

Class myclassname {
    function __construct() {
      //this is the new constructor using __construct instead of the same function name as class name.

So what I did was to go into /usr/share/php/php-gettext/stream.php and /usr/share/php/php-gettext/gettext.php (or whatever file stated in your error), go to the file and change function myclassname() to function __construct.

The function myclassname should be identical to the CLASS myclassname declaration.

You should see about 4 errors if you are on ubuntu 16.04 with latest gettext. I just change that and it's not harmful to your system. It's a outdated programming syntax and if you upgrade in the future you wouldn't face any problem too. I will say it's a safe edit.

It's not really a major change or anything, just syntax updating. If you install from apt-get package you really have no other choice unless you compile yourself.

sudo nano /usr/share/php/php-gettext/streams.php

Line 48 StringReader Error.

Go to Line 52 and change

function StringReader ($str='') {


function __construct($str='') {

Line 84 FileReader Error

Go to Line 90 and change

function FileReader($filename) {


function __construct($filename) {

Line 145 CacheFileReader error

Go to Line 146 and change

function CachedFileReader($filename) {


function __construct($filename) {

Using 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

function gettext_reader($Reader, $enable_cache = true) {


function __construct($Reader, $enable_cache = true) {
| improve this answer | |
  • 2
    one should see : sudo nano /usr/share/php/php-gettext/gettext.php and sudo nano /usr/share/php/php-gettext/streams.php – Technico.top Oct 11 '16 at 13:10
  • the packaged files are from 20101225. So even though keeping backups is just what you do - always - you should be safe from a package update unfixing your fix, any updates should contain that fix by themselves! – flowtron Jan 15 '18 at 10:09

Since I don't have enough reputation yet to comment on Someone Special's great answer, I'll just reply instead.

Here are the one-line commands that perform the suggested edits:

sed -ri.bak 's:function StringReader.*:function __construct($str=\x27\x27) {:' /usr/share/php/php-gettext/streams.php
sed -ri 's:function FileReader.*:function __construct($filename) {:' /usr/share/php/php-gettext/streams.php
sed -ri 's:function CachedFileReader.*:function __construct($filename) {:' /usr/share/php/php-gettext/streams.php
sed -ri.bak 's:function gettext_reader.*:function __construct($Reader, $enable_cache = true) {:' /usr/share/php/php-gettext/gettext.php
| improve this answer | |
  • saved me a bit of time there... thanks man :-) – Adam May 23 '18 at 10:14

You can use another PPA for phpmyadmin.Here it is PPA Link

sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt update
sudo apt install phpmyadmin

As it is only a temporary solution or not a optimal one, till the package of phpmyadmin in ubuntu repos are rebuild.

| improve this answer | |
  • 1
    This helped me though – Shashank Saxena May 2 '18 at 11:57
  • Be careful, this ppa hasn't received any update for more than a year. – Laurent Jun 14 '18 at 4:32

This deprecation notice" message on login page of phpMyAdmin issue is easily solved by editing the php.ini file at /etc/php/7.0/apache2/php.ini

Change error_reporting value to:

error_reporting = ~E_DEPRECATED & E_ALL     

By default it is on comment position, so uncomment it and change it.

Then restart Apache:

sudo systemctl restart apache2
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.