欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

【LAMP】Fatal error: Call to undefined function mb_detect_encoding(),该怎么解决

程序员文章站 2023-12-28 15:52:04
...
【LAMP】Fatal error: Call to undefined function mb_detect_encoding()
本帖最后由 default7 于 2014-06-15 14:52:48 编辑 我安装LAMP环境,php-xxx-.tar.gz解压缩后的目录 /home/default7/LAMP/php-5.5.13
PHP安装到的目录 /usr/local/php5
然后我安装之后,打开phpmyadmin,报错提示:


Fatal error: Call to undefined function mb_detect_encoding() in /usr/local/apache2/htdocs/phpmyadmin/libraries/php-gettext/gettext.inc on line 177


命令提示行查看php已经安装的模块:mbstring是存在的
引用
[[email protected] php-5.5.13]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mbstring
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zip
zlib

[Zend Modules]


查看phpinfo,相关几个:

PHP Version 5.5.13
Configure Command
'./configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' '--prefix=/usr/local/php5'

Server API
Apache 2.0 Handler

Virtual Directory Support
enabled

Configuration File (php.ini) Path
/usr/local/php5/lib

Loaded Configuration File
/usr/local/php5/lib/php.ini

Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
extension_dir
/usr/local/php5/lib/php/extensions/no-debug-zts-20121212
/usr/local/php5/lib/php/extensions/no-debug-zts-20121212



查看php5安装后的extension目录(是空的):

[[email protected] ext]# ll /usr/local/php5/lib/php/extensions/no-debug-zts-20121212
total 488
-rwxr-xr-x. 1 root root 495775 Jun 15 01:01 opcache.so
[[email protected] ext]# ll /usr/local/php5/lib/php/extensions
total 4
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 no-debug-zts-20121212


但是在安装后的目录里面另外一个目录却有(目录 /usr/local/php5/include/php/ext):

[[email protected] ext]# pwd
/usr/local/php5/include/php/ext
[[email protected] ext]# ll
total 68
drwxr-xr-x. 3 root root 4096 Jun 15 01:01 date
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 dom
drwxr-xr-x. 3 root root 4096 Jun 15 01:01 ereg
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 filter
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 hash
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 iconv
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 json
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 libxml
drwxr-xr-x. 2 root root 4096 Jun 15 01:02 mysqlnd
drwxr-xr-x. 3 root root 4096 Jun 15 01:01 pcre
drwxr-xr-x. 2 root root 4096 Jun 15 01:02 pdo
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 phar
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 session
drwxr-xr-x. 2 root root 4096 Jun 15 01:01 spl
drwxr-xr-x. 3 root root 4096 Jun 15 01:01 sqlite3
drwxr-xr-x. 2 root root 4096 Jun 15 01:02 standard
drwxr-xr-x. 2 root root 4096 Jun 15 01:02 xml
[[email protected] ext]#




在安装文件夹(/home/default7/LAMP/php-5.5.13/ext)中有mbstring:

[[email protected] ext]# ll
total 328
drwxr-xr-x. 4 1001 1001 4096 May 28 17:06 bcmath
drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 bz2
drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 calendar
drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 com_dotnet
drwxr-xr-x. 4 1001 1001 4096 Jun 15 00:27 ctype
drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 curl
drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:25 date
drwxr-xr-x. 6 1001 1001 4096 May 28 17:06 dba
drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:27 dom
drwxr-xr-x. 4 1001 1001 4096 May 28 17:06 enchant
drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:25 ereg
drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 exif
-rwxr-xr-x. 1 1001 1001 8174 May 28 17:06 ext_skel
【LAMP】Fatal error: Call to undefined function mb_detect_encoding(),该怎么解决

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频


网友评论

文明上网理性发言,请遵守 新闻评论服务协议

我要评论
  • 【LAMP】Fatal error: Call to undefined function mb_detect_encoding(),该怎么解决
  • 专题推荐

    上一篇:

    下一篇: