当前位置:Gxlcms > PHP教程 > PHP动态编译安装mysqlimysqlmysqlnd

PHP动态编译安装mysqlimysqlmysqlnd

时间:2021-07-01 10:21:17 帮助过:36人阅读

下载对应版本的PHP源码并解压,我的版本是php-5.4.16

进入源码目录下的ext/mysqlnd,并编译出mysqlnd.so

cp config9.m4 config.m4
sed -ie "s{ext/mysqlnd/php_mysqlnd_config.h{config.h{" mysqlnd_portability.h#修改源文件
phpize  #执行phpize,增加./configure 配置
./configure --with-php-c/to/php-config  #配置文件为原php的bin下的php-config
sudo make &&sudo make install  #编译安装

如果不晓得php-config在哪,可以用这个命令查找

sudo find /-name php-config

进入ext/mysql,编译出mysql.so

phpize
./configure --with-php-config=/path/to/php-config--with-mysql=mysqlnd
make && make install

进入ext/mysqli,编译出mysqli.so

phpize
./configure --with-php-config=/path/to/php-config--with-mysqli=mysqlnd
make && make install

在php.ini中加入

extension=mysqlndextension=mysqlextension=mysqli

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了PHP 动态编译安装 mysqli mysql mysqlnd,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 人气教程排行