When i want run phpMyAdmin on my browser, that show me this error:
Fatal error: Call to undefined function __() in /usr/share/phpMyAdmin/libraries/core.lib.p
If you are using a different user for a reason, e.g. when having httpd-itk
(RHEL/CentOS/Fedora) or apache2-mpm-itk
(Debian/Ubuntu) and your main user is not apache
or www-data
, then do:
sudo usermod -a -G apache youruser
or
sudo usermod -a -G www-data youruser
depending on your distribution, then phpMyAdmin will work.
I encountered this after a parse error in config.inc.php. Unfortunately, phpMyAdmin sets error_reporting(0)
while reading the configuration file. Open libraries/Config.class.php, search for $old_error_reporting = error_reporting(0);
and replace it with $old_error_reporting = error_reporting(E_ALL);
to see what's going on. Of course you should revert this change later for security reasons.
Pretty much as other users had said... I'm running Debian 8 with PHP7 and ran into the issue, so just installing;
sudo apt-get install php7.0-mbstring
Followed by restarting the Apache service;
sudo service apache2 restart
And then phpmyadmin ran fine.
For Debian users: (I ended up in this thread as a Debian user) I read @naveen 's answer and it appeared I didn't have php-mbstring installed, installing it solved my problem:
sudo apt-get install php-mbstring
(After installing php-mbstring, don't forget to restart Apache:)
sudo systemctl restart apache2
For me the error was in /usr/share/phpMyAdmin/libraries/sanitizing.lib.php
.
I increased php error reporting following this advice
and commented the offending line in sanitizing.lib.php by prepending //
in front.
Then the error was more descriptive: Fatal error: require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.') in /usr/share/phpmyadmin/libraries/common.inc.php on line 477
I noticed that I somehow lost the php-gettext debian package, but after installing it phpMyAdmin worked again.
Check that your session directory is writable by the webserver process.
The best way to do so is to create your own phpinfo file; in any web accessible folder create a file (you can call it test.php or phpinfo.php or whatever you'd like) with the following content:
<?php
phpinfo();
?>
Open that file in your browser (http://localhost/test.php
or similar) and look for the line session.save_path
. That's your session folder; make sure the permissions are suitable and see if that helps.
More information from a similar thread.