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.

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:

  • I am setting up a server for the first time and I had the same issue as the op, except that I wasn't upgrading it was a fresh install of 16.04. The same issue however, and this fixed the problem. Thank you! – Darren Haynes May 2 '16 at 2:58
  • Thanks you, I had the same problem, it worked, +1 from me. – Zviad Gabroshvili Jul 15 '16 at 16:51
  • sudo apt install php-gettext is enough. This installs the others. – bshea Oct 25 '16 at 17:40
  • This doesn't work on Ubuntu 18.04. Any other ideas? – EODCraft Staff May 9 at 14:42
  • Found it! You have to Manually add the Repository. askubuntu.com/a/715947/619039 – EODCraft Staff May 9 at 15:11

You need to install php-gettext , Install it using

 sudo apt-get install php-gettext

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
  • 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

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.

Try using:

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

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

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

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

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/

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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