升级我们服务器上的某些 php 库后,phpmyadmin 无法加载。
当我尝试访问浏览器时,我看到网络浏览器上出现以下错误
phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.
这是我在日志文件中看到的错误。
tail -f /var/log/nginx/phpmyadmin/error.log
2015/09/16 12:54:13 [error] 9103#0: *21314 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined property: PMA_Error::$_hash in /usr/share/phpMyAdmin/libraries/Error.class.php on line 164
PHP message: PHP Notice: Undefined property: PMA_Error::$_params in /usr/share/phpMyAdmin/libraries/Message.class.php on line 495
PHP message: PHP Fatal error: Class 'PMA_Message' not found in /usr/share/phpMyAdmin/libraries/Message.class.php on line 601" while reading upstream, client: 123.456.789.123, server: server12-admin.smokeccs.com, request: "GET /index.php?token=b07fa5dd143c2c9ec26042ee527121ba HTTP/1.1", upstream: "fastcgi://unix:/tmp/php5-fpm.sock:", host: "server12-admin.smokeccs.com", referrer: "http://server12-admin.smokeccs.com/index.php?token=96f06e54e731f866b4b22f8abd46b7c2"
我们的服务器详细信息
Server: Localhost via UNIX socket
Server type: Percona Server
Server version: 5.6.22-71.0 - Percona Server (GPL), Release 71.0, Revision 726
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)
nginx/1.6.2
Database client version: libmysql - 5.1.73
PHP extension: mysqli Documentation
Phpmyadmin version
Version information: 4.0.10.8, latest stable version: 4.4.14.1
答案1
经过一些谷歌搜索该问题与 phpmyadmin 正在使用的会话文件夹的权限有关。
chown root:nginx /var/lib/php/session/