When installing PHP (fastcgi mode), there are often such commands:/usr/local/webserver/php/bin/phpize
What does Phpize do?
What is Phpize? PHP Official Description:
http://php.net/manual/en/install.pecl.phpize.php
Phpize is used to extend the PHP extension module, through the phpize can build PHP plug-in module
Second, how to use Phpize?
When PHP is compiled, the phpize script file will be available in the bin directory of PHP. Before compiling the extension module you want to add, execute the following phpize.
1. For example, now you want to add the memcache extension module to PHP: We're just going to do the following steps.
———————————————————————— Tar zxvf memcache-2.2.5.tgzcd memcache-2.2.5//usr/local/webserver/php/bin/phpize./ Configure–with-php-config=/usr/local/webserver/php/bin/php-configmakemake Install ———————————————————————— Note. Configure can be specified after the path of the Php-config file so that the compilation is complete, but also to do is to add the extension value in the php.ini file extension = "memcache.so"
View Code
2. Example application: Environment php5.2.6, MySQL extension not supported
If the PHP source package in the/usr/local/src/php-5.2.6php installation directory is/usr/local/php# cd/usr/local/src/php-5.2.6# CD./ext/mysql#/usr/local/ php/bin/phpize#./configure–with-php-config=/usr/local/php/bin/php-config# make# Make Install this time you will see mysql.so is copied to a directory, the mysql.so copy to your Extension_dir point to the path, in php.ini add extension=mysql.so Restart the Web server, Look at Phpinfo, you should support MySQL, over! Note: Some errors may be prompted when performing/usr/local/php/bin/phpize, such as: Cannot find autoconf, which installs the relevant software according to the error Rhel series using Yum-y install autoconf can be other errors, please leave a message to me! So the installation Php-devel related kits will have phpize can be used (file presets stored in/usr/bin/phpize) phpize command is used to prepare PHP plug-in module of the compilation environment. In the following example, the source of the plug-in module is located in the Extname directory: # CD extname# phpize#./configure (Note i) # make# make install successful installation will build extname.so and placed in PHP plug-in module stored in the/usr/lib/php/modules/(preset). You need to adjust php.ini, add extension=extname.so this line before you can use this plug-in module. Note: If a not find–with-php-config occurs when the./configure is executed, the following instructions can be re-located because the –with-php-config preset is found in/usr/bin/php-config./configure–wi Th-php-config=/usr/bin/php-config need to adjust php.ini, add extension=extname.so this line before you can use this extension library.
View Code