phpize is something that belongs to php-devel. It is mainly used to set some settings of php plug-in modules
For example, your php does not support mysql, mbstring, etc.
Example application:
Environment php5.2.6, does not support mysql extension
If the source code package of php is in /usr/local/src/php-5.2.6
The php 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
At this time you will see that mysql.so is copied to a certain directory, copy mysql.so to the path pointed by your extension_dir, and add extension=mysql.so
in php.ini
Restart the web server, take a look at phpinfo, mysql should be supported, done!
Note: Some errors may be prompted when executing /usr/local/php/bin/phpize, such as: Cannot find autoconf, then install the relevant software according to the error prompts. For the RHEL series, use yum -y install Just autoconf
For other errors, please leave a message to me!
So after installing php-devel related packages, phpize will be available (the file is stored in /usr/bin/phpize by default)
The phpize command is used to prepare the compilation environment for PHP plug-in modules. In the following example, the source program of the plug-in module is located in the extname directory:
# cd extname
#phpize
# ./configure (Note 1)
# make
# make install
A successful installation will create extname.so and place it in the PHP plug-in module directory (by default it is stored in /usr/lib/php/modules/).
You need to adjust php.ini and add the extension=extname.so line before you can use this plug-in module.