Home > Backend Development > PHP Tutorial > PHP dynamic compilation and installation mysqli mysql mysqlnd

PHP dynamic compilation and installation mysqli mysql mysqlnd

WBOY
Release: 2016-07-29 08:58:53
Original
2043 people have browsed it

Download the corresponding version of PHP source code and unzip it. My version is php-5.4.16

Enter ext/mysqlnd in the source code directory and compile mysqlnd.so

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

If you don’t know where php-config is, you can Use this command to find

<code>sudo find <span>/</span><span>-name</span> php<span>-config</span></code>
Copy after login

Enter ext/mysql, compile mysql.so

<code>phpize
<span>.</span>/configure <span>--</span><span>with</span><span>-php</span><span>-config</span><span>=</span>/path/<span>to</span>/php<span>-config</span><span>--</span><span>with</span><span>-mysql</span><span>=</span>mysqlnd
make <span>&&</span> make install</code>
Copy after login

Enter ext/mysqli, compile mysqli.so

<code>phpize
<span>.</span>/configure <span>--</span><span>with</span><span>-php</span><span>-config</span><span>=</span>/path/<span>to</span>/php<span>-config</span><span>--</span><span>with</span><span>-mysqli</span><span>=</span>mysqlnd
make <span>&&</span> make install</code>
Copy after login

Add

<code><span>extension=<span>mysqlnd</span></span><span>extension=<span>mysql</span></span><span>extension=<span>mysqli</span></span></code>
Copy after login
') to php.ini.addClass('pre- numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the PHP dynamic compilation and installation of mysqli mysql mysqlnd, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template