20

I am about to use phpmyadmin on Ubuntu 16.04. But it shows that the page is not working. the error log says error 500

PHP Fatal error:  require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477

At first it says that the mysqli|mysql extension is missing. but after sleepless hours I forget what I've been done to it. I am using php7.

Jorge Castro
  • 71,754

9 Answers9

44
sudo apt-get install php-mbstring php7.0-mbstring php-gettext

or simply:

sudo apt-get install php-gettext

and then:

sudo service apache2 restart

This has been reported at this bug:

6

You need to install php-gettext , Install it using

 sudo apt-get install php-gettext
Rahul K Jha
  • 1,018
6

I lost hours to solve this problem. Just install php-mbstring, php7.0-mbstring and php-gettext. That's it.

You can do that by running the following command:

sudo apt-get install php-mbstring php7.0-mbstring php-gettext
Dan
  • 13,119
  • I haven't installed/tried 16.04 yet, but I would assume installing php-mbstring would automatically install php7-mbstring if you have php7 installed. – Dan Apr 19 '16 at 16:09
  • Maybe you are right; maybe that's just a metapacket. – Mich. Gio. Apr 19 '16 at 16:23
3

In my case, my problem was with the folder creation. When I was installing the php-gettext lib with:

sudo apt-get install php-gettext

Two folders are created in usr/share/php

Folder 1 - usr/share/php/php-gettext
Folder 2 - usr/share/php/php-phpgettext

And inside the first folder some symbolic links to the second folder.

I deleted the first folder with:

sudo rm -r usr/share/php/php-gettext

And then copy the php-php-gettext folder to php-gettext with:

sudo cp -r php-php-gettext php-gettext

Now my phpmyadmin works.

Zanna
  • 70,465
2

Try using:

sudo apt-get install php-mbstring php7.0-mbstring php-gettext
0

Use Synaptic Package Manager, install php7.0-mbstring, and do sudo service apache2 restart.

Videonauth
  • 33,355
  • 17
  • 105
  • 120
Cholis
  • 1
0

I Try this:
sudo dpkg-reconfigure phpmyadmin
and set socket on TCP/IP. After the
sudo apt-get install php-mbstring php7.0-mbstring php-gettext
sudo service apache2 restart

0

If you installed phpymadmin from the archives, php-gettext is a dependency and would be automatically installed.

nacc
  • 1
0

Run

sudo apt-get install phpmyadmin php-mbstring php-gettext

sudo service apache2 restart

http://www.dailytechnoblog.com/how-to-resolve-phpmyadmin-error-the-mbstring-extension-is-missing-please-check-your-php-configuration/

Sameer
  • 1