【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,报错提示:
<br />Fatal error: Call to undefined function mb_detect_encoding() in /usr/local/apache2/htdocs/phpmyadmin/libraries/php-gettext/gettext.inc on line 177<br /> Nach dem Login kopieren
命令提示行查看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,相关几个: <br />PHP Version 5.5.13<br />Configure Command <br /> './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' '--prefix=/usr/local/php5' <br /><br />Server API<br /> Apache 2.0 Handler<br /><br />Virtual Directory Support<br /> enabled<br /><br />Configuration File (php.ini) Path<br /> /usr/local/php5/lib<br /><br />Loaded Configuration File<br /> /usr/local/php5/lib/php.ini<br /><br />Scan this dir for additional .ini files (none)<br />Additional .ini files parsed (none) <br />extension_dir<br /> /usr/local/php5/lib/php/extensions/no-debug-zts-20121212<br /> /usr/local/php5/lib/php/extensions/no-debug-zts-20121212<br /><br /> Nach dem Login kopieren
查看php5安装后的extension目录(是空的):
<br />[[email protected] ext]# ll /usr/local/php5/lib/php/extensions/no-debug-zts-20121212<br />total 488<br />-rwxr-xr-x. 1 root root 495775 Jun 15 01:01 opcache.so<br />[[email protected] ext]# ll /usr/local/php5/lib/php/extensions<br />total 4<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 no-debug-zts-20121212<br /> Nach dem Login kopieren
但是在安装后的目录里面另外一个目录却有(目录 /usr/local/php5/include/php/ext):
<br />[[email protected] ext]# pwd<br />/usr/local/php5/include/php/ext<br />[[email protected] ext]# ll<br />total 68<br />drwxr-xr-x. 3 root root 4096 Jun 15 01:01 date<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 dom<br />drwxr-xr-x. 3 root root 4096 Jun 15 01:01 ereg<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 filter<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 hash<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 iconv<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 json<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 libxml<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:02 mysqlnd<br />drwxr-xr-x. 3 root root 4096 Jun 15 01:01 pcre<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:02 pdo<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 phar<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 session<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:01 spl<br />drwxr-xr-x. 3 root root 4096 Jun 15 01:01 sqlite3<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:02 standard<br />drwxr-xr-x. 2 root root 4096 Jun 15 01:02 xml<br />[[email protected] ext]# <br /><br /> Nach dem Login kopieren
在安装文件夹(/home/default7/LAMP/php-5.5.13/ext)中有mbstring:
<br>[[email protected] ext]# ll<br>total 328<br>drwxr-xr-x. 4 1001 1001 4096 May 28 17:06 bcmath<br>drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 bz2<br>drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 calendar<br>drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 com_dotnet<br>drwxr-xr-x. 4 1001 1001 4096 Jun 15 00:27 ctype<br>drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 curl<br>drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:25 date<br>drwxr-xr-x. 6 1001 1001 4096 May 28 17:06 dba<br>drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:27 dom<br>drwxr-xr-x. 4 1001 1001 4096 May 28 17:06 enchant<br>drwxr-xr-x. 5 1001 1001 4096 Jun 15 00:25 ereg<br>drwxr-xr-x. 3 1001 1001 4096 May 28 17:06 exif<br>-rwxr-xr-x. 1 1001 1001 8174 May 28 17:06 ext_skel<div class="clear">
</div> Nach dem Login kopieren