调用未定义的函数__()错误-带有LNMP的phpMyAdmin

前端之家收集整理的这篇文章主要介绍了调用未定义的函数__()错误-带有LNMP的phpMyAdmin 前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我对PHPMyAdmin有问题.当我访问该页面时,它显示为白色空白页.

这是错误日志

2016/07/26 11:20:16 [error] 2591#2591: *2 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function __() in /usr/share/PHPmyadmin/libraries/core.lib.PHP:235
Stack trace:
#0 /usr/share/PHPmyadmin/libraries/core.lib.PHP(308): PMA_fatalError('The [a@./url.ph...')
#1 /usr/share/PHPmyadmin/libraries/common.inc.PHP(90): PMA_warnMissingExtension('mbstring',true)
#2 /usr/share/PHPmyadmin/index.PHP(12): require_once('/usr/share/PHPm...')
#3 {main}
  thrown in /usr/share/PHPmyadmin/libraries/core.lib.PHP on line 235" while reading response header from upstream,client: XX.XX.XX.XX,server: localhost,request: "GET / HTTP/1.1",upstream: "fastcgi://unix:/run/PHP/PHP7.0-fpm.sock:",host: "XX.XX.XX.XX:8080"

我遵循此答案(https://stackoverflow.com/a/21321260),将/ var / lib / PHP / sessions的所有者更改为www-data,并使该目录可写.

enter image description here

但这无济于事,问题依然存在.

我的LNMP是:

> Debian 8(Jessie)64位
> PHP7(PHP-FPM)
> MariaDB 10.0
> Nginx

这是我的Nginx服务器块:

server {
    listen 8080;
    server_name localhost;
    root /usr/share/PHPmyadmin;
    index index.PHP index.html index.htm;

    access_log /var/log/Nginx/PHPmyadmin.com.access.log;
    error_log /var/log/Nginx/PHPmyadmin.com.error.log;

    if (!-e $request_filename) {
        rewrite ^/(.+)$/index.PHP?url=$1 last;
        break;
    }
    location ~ .PHP${
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.PHP)(/.+)$;
        fastcgi_pass unix:/run/PHP/PHP7.0-fpm.sock;
        fastcgi_index index.PHP;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}   

我应该做些什么?

最佳答案
从您的日志消息中,看来似乎缺少mbstring扩展名:

/usr/share/PHPmyadmin/libraries/common.inc.PHP(90): PMA_warnMissingExtension(‘mbstring’,true)

由于您使用的是Debian,请使用此插件安装扩展程序:

sudo apt-get install PHP7.0-mbstring
原文链接:/nginx/532467.html

猜你在找的Nginx相关文章