Phpize is used to extend the PHP extension module, through the phpize can build PHP plug-in module, the following describes a method of its use, the need for friends can refer to the next
When installing (fastcgi mode), there are often such commands:
The code is as follows:
/usr/local/webserver/php/bin/phpize
What does Phpize do?
What is Phpize?
Phpize is used to extend the PHP extension module, through the phpize can build PHP plug-in module
For example, if you want to add extensions such as memcached or ImageMagick in the original compiled PHP, you can use Phpize to work through the following steps.
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.
For example, now you want to add the memcache extension module to PHP: We're just going to do the following steps.
The code is as follows:
Tar zxvf memcache-2.2.5.tgz
CD memcache-2.2.5/
/usr/local/webserver/php/bin/phpize
./configure–with-php-config=/usr/local/webserver/php/bin/php-config
Make
Make install
Note the path to the Php-config file that can be specified after/configure.
This completes the compilation, and it is necessary to add the extension value to the php.ini file.
The code is as follows:
Extension = "memcache.so"
Note: Cannot find CONFIG.M4.
This error is a silly mistake, the decompression will require CD to the folder, or Phpize would be an error
Dynamically compiled PHP's memcache extension library, an error occurred while executing/usr/localphp/bin/phpize,
The code is as follows:
Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf environment variable are set correctly and then rerun this SC Ript.
The file is obviously missing and needs to be installed.
The code is as follows:
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# TAR-ZVXF M4-1.4.9.tar.gz
# CD m4-1.4.9/
#./configure && make && make install
# CD: /
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# TAR-ZVXF Autoconf-2.62.tar.gz
# CD autoconf-2.62/
#./configure && make && make install
Then execute the following command to install
#/usr/local/php/bin/phpize
#./configure–prefix=/usr/local/memcached–with-libevent=/usr/local/libevent–with-php-config=/usr/local/php/bin/ Php-config
#make && make Install