作者:孤独小舟9 | 来源:互联网 | 2023-05-17 14:34
phpmyadmin可以被理解成一个web程序,要放在nginx的www目录下解释执行,我的www目录是varwww配置好了虚拟主机,访问www.mathandcs.comphpmy
phpmyadmin可以被理解成一个web程序,要放在nginx的www目录下解释执行,我的www目录是/var/www
配置好了虚拟主机,访问www.mathandcs.com/phpmyadmin时,报500错误。
1.查看nginx 错误日志:
tail -f /var/log/nginx/error.log 没发现什么问题,很困惑
2.然后看php-fpm的错误日志:
tail -f /var/log/php-fpm/www-error.log:
发现:PHP Fatal error: Call to undefined function mb_detect_encoding()
好了,发现了问题,解决问题就简单了,google之:
得到解决办法(地址:http://stackoverflow.com/questions/10278561/how-to-install-php-mbstring-on-centos-6-2):
*Make sure you update your linux box first
yum update
In case someone still has this problem, this is a valid solution:
centos-release : rpm -q centos-release
Centos 6.*
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm
Centos 5.*
wget http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -ivh epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm
Then just do this to update:
yum --enablerepo=remi upgrade php-mbstring
Or this to install:
yum --enablerepo=remi install php-mbstring
安装了php-mbstring这个拓展就ok了。