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
I just set up CentOS 7 and tried phpmyadmin and was having the same problem. Hope this helps
I set the correct permissions to the sessions directory and restarted apache, even disabled SELinux but was shown the same error
I did not have the php-mbstring installed - once i did that, it worked
sudo yum install php-mbstring
Check the requirements for phpmyadmin
Check whether your PHP extensions are loaded. When the mysql or mysqli extensions fail to load, the result will be exactly this error (which is quite confusing). To check that your extensions are loading correctly, have a look at the output of the PHP function phpinfo() - all loaded extensions are listed there.
In my case using php-fpm under CentOS 7, it was the reason @Issac pointed out, and just solved with:
mkdir -p /var/lib/php/session
chown -R apache:apache /var/lib/php
Then solved.
Just create the session folder, I think this direct solution can work on this specific case.
WARNING: Before you do this, be sure to check if the
/var/lib/php
folder exists, and check which user is in use for thephp-fpm
process. If you are using nobody for the php-fpm process, set 777 permission for the/var/lib/php/session
can work well.
In my case this error was intermittent and I'd had phpMyAdmin installed and running fine for years. Reading the answers here, it seemed the error might have something to do with the sessions.
On Ubuntu 16.04 the PHP sessions are in:/var/lib/php/sessions
and look like:
$ sudo ls -al /var/lib/php/sessions/
total 128
drwx-wx-wt 2 root root 73728 Mar 4 14:09 .
drwxr-xr-x 4 root root 4096 Mar 8 2017 ..
-rw------- 1 www-data www-data 67 Mar 4 14:05 sess_dvg6vo1k1s1c0353rjk09g9vu1
-rw------- 1 www-data www-data 67 Mar 4 13:49 sess_e4ha0gl4f7gukku1o2uc4h5rs2
-rw------- 1 www-data www-data 67 Mar 4 14:05 sess_qhbve6k4a7svu6pk0lk568jgt0
-rw------- 1 www-data www-data 67 Mar 4 13:49 sess_sh48e898i7ad14oidsph08in10
-rw------- 1 www-data www-data 30044 Mar 4 14:04 sess_uvumc2341dvtfikl27kpile46pmfbon1
(That last one in the listing looked "funny" to me.)
I first tried restarting apache2
but the sessions apparently survive that. So I just deleted them. (Don't know of another way to clear them.) Upon refreshing the browser, the phpMyAdmin login displayed and everything is working as expected.