Home  >  Article  >  php教程  >  服务器源码安装PHP 后如何安装mbstring扩展

服务器源码安装PHP 后如何安装mbstring扩展

WBOY
WBOYOriginal
2016-06-06 19:59:391010browse

php的源码包在/home/tmp/sh/php-5.2.17/;php安装目录是/alidata/server/php 执行以下命令: # cd /home/tmp/sh/php-5.2.17/ext/mbstring/ # /alidata/server/php/bin/phpize # ./configure --with-php-config=/alidata/server/php/bin/php-config # make #



php的源码包在/home/tmp/sh/php-5.2.17/;php安装目录是/alidata/server/php

执行以下命令:
# cd  /home/tmp/sh/php-5.2.17/ext/mbstring/
# /alidata/server/php/bin/phpize
# ./configure --with-php-config=/alidata/server/php/bin/php-config
# make
# make install

执行完毕后在php.ini里增加extension=mbstring.so,并设置extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2006061"

重启php-fpm. 会报错tarting php_fpm PHP Warning:  PHP Startup: Invalid library (maybe not a PHP library) 'mbstring.so'  in Unknown on line 0  done

把extension=mbstring.so去掉,

重启php-fpm就ok了。

ps:编译了新的 php模块进来后,不一定要增加extension的配置

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn