Suddenly want to add a module to PHP, but do not want to recompile PHP, because the real comparison cost time.
Phpize can solve this problem.
CD to PHP's source code directory, into ext.
For example, my work as a need to append mysqli module, into the Mysqli directory.
[Vagrant@rs-1 mysqli]$ pwd
/home/vagrant/download/php-5.5.11/ext/mysqli
Execute Phpize, Yi, an error!!
[Vagrant@rs-1 mysqli]$ Phpize
Configuring for:
PHP Api version:20121113
Zend Module Api no:20121212
Zend Extension Api no:220121212
Cannot find autoconf. Please check your autoconf installation and the
$PHP _autoconf environment variable. Then, rerun this script.
Google, the solution is as follows: Install autoconf
[vagrant@rs-1 mysqli]$ sudo yum install AutoConfig
Execute phpize again without an error.
[Vagrant@rs-1 mysqli]$ Phpize
Configuring for:
PHP Api version:20121113
Zend Module Api no:20121212
Zend Extension Api no:220121212
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/PHP/
found that the Configure file was generated in the current directory.
Execute Configure
[Vagrant@rs-1 mysqli]$./configure--with-php-config=/usr/local/bin/php-config--with-mysqli=/usr/bin/mysql_config
Compiling the installation
[Vagrant@rs-1 mysqli]$ sudo make && sudo make install
This time you will find that the/usr/local/include/php/ext directory has more than MYSQLI modules
[Root@rs-1 ext]# LL
Total 152
Drwxr-xr-x 3 root root 4096 May 9 05:09 date
Drwxr-xr-x 2 root root 4096 May 9 05:09 Dom
Drwxr-xr-x 3 root 4096 May 9 05:09 Ereg
Drwxr-xr-x 2 root root 4096 May 9 05:09 filter
Drwxr-xr-x 2 root root 4096 May 9 05:09 Hash
Drwxr-xr-x 2 root 4096 May 9 05:09 Iconv
Drwxr-xr-x 2 root root 4096 May 9 05:09 JSON
Drwxr-xr-x 2 root 4096 May 9 05:09 libxml
Drwxr-xr-x 4 root 4096 May 9 05:09 mbstring
Drwxr-xr-x 2 root 4096 May 9 07:32 mysqli
Drwxr-xr-x 3 root 4096 May 9 05:09 Pcre
Drwxr-xr-x 2 root 4096 Apr 13:07 PDO
Drwxr-xr-x 2 root 4096 May 9 05:09 Phar
Drwxr-xr-x 2 root root 4096 May 9 05:09 sessions
Drwxr-xr-x 2 root 4096 May 9 05:09 sockets
Drwxr-xr-x 2 root root 4096 May 9 05:09 SPL
Drwxr-xr-x 3 root root 4096 Apr 15:11 sqlite3
Drwxr-xr-x 2 root 4096 May 9 05:10 standard
Drwxr-xr-x 2 root root 4096 May 9 05:10 XML