Use phpize in linux to install the php extension module and phpize extension module
In linux, after php is successfully installed, an executable script named phpize is generated in the bin directory. This script is used to dynamically install the php extension module.
The advantages of using the phpize script to install the php extension module: extensions that are not installed during php installation can be installed at any time without the need to reinstall PHP.
Installation steps:
1. Switch to the extension module directory. There is an ext subdirectory in the directory after the php source code package is decompressed. There are nearly 70 mainstream php extension module installation packages.
If you want to install the imap extension, switch to the imap directory:
Cd/software/php-5.5.3/ext/imap
2. Run the phpize script/usr/local/php/bin/phpize in the imap directory.
When the execution is successful, several rows of data are returned:
Processing ing:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
3, start to compile (note -- with-php-config parameter) if the compilation process reports an error, you can refer to another article to solve the error http://blog.csdn.net/haiqiao_2010/article/details/46005773
./Configure -- with-php-config =/usr/local/php/bin/php-config -- with-kerberos -- with-imap-ssl
4. make5 and make install
The system prompts are as follows:
In this case
/Usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
Directory will generate the imap. so file
6. Find the extension_dir field in php. ini and change the value:
/Usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/
7. Add extension = "imap. so" under the Dynamic Extensions section of php. ini"
8. Restart the server
PHP, NGINX, and APACHE.
Phpinfo () shows the following module extensions, indicating that the installation is successful.