phpmyadmin提示The mbstring extension is missing

centos7 装了nginx 和 mariadb 以及php71u-fpm后,我开始尝试使用phpmyadmin 去连接数据库。

出现如下错误:

网上着直接安装mbstring
http://www.jb51.net/article/58612.htm

yum install php-mbstring

于是搜索下:

[root@localhost www]# yum search php71u-mbstring
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.yun-idc.com
 * epel: mirror.premi.st
 * extras: mirrors.tuna.tsinghua.edu.cn
 * ius: mirrors.tuna.tsinghua.edu.cn
 * updates: mirrors.nwsuaf.edu.cn
 * webtatic: us-east.repo.webtatic.com
========================================================================= N/S matched: php71u-mbstring ==========================================================================
php71u-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling

  Name and summary matches only, use "search all" for everything.
[root@localhost www]#

果然有这个包,直接安装

yum -y install php71u-mbstring

然后重启php-fpm

systemctl restart php-fpm

刷新页面,出现了新的错误

缺少json,直接yum search 然后安装

重启php-fpm

nginx+ php 配置 access denied

之前配置nginx+php的时候,每次,访问html页面是正常的,但是一旦访问php的页面就出现acces denied.

 

后来发现是nginx配置问题/etc/nginx/conf.d/default.conf

server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        root   /data/www/wiki;
        index  index.php index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /data/www/wiki/;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /data/www/wiki/$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}

添加了上面红色部分的代码后,一切正常