The following root parameters are the modules we need. However, as we need to add some modules and don't want to re-compile php, we can use phpize.
II. how to use phpize?
After php compilation is complete, the php bin directory contains the phpize script file. Run the following phpize command before compiling the extension module you want to add;
# If you forget to add some modules during compilation, you can use this method to re-compile and add them!
# First, go to the PHP Directory (uncompiled) extension directory
# Call the phpize program to generate the compilation configuration file
# Find/-name phpize
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
# Compile the extension Library
# After make is successfully executed, the generated extension library file is in the modules subdirectory of the current directory.
# Edit the php. ini file, locate the extension_dir directory, and copy the compiled extension file to the extension directory.
# 491st rows
# Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613 /"
Cp ftp. so/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
# Add The Extension Library location in php. ini and set the extension library to be added.
# Add extension = ftp. so in section 612
# Restart webservice
The 181 php source code is located in
In the past two days, I tried to install a Xenforo forum on the above platform. the following message is displayed at the beginning of the installation:
The following errors occurred while verifying that your server can run XenForo:
* The required PHP extension MySQLi cocould not be found. Please ask your host to install this extension.
* The required PHP extension GD cocould not be found. Please ask your host to install this extension.
Since PHP is compiled and installed by source code, the above two extensions are not installed. the process of adding these two extensions for PHP is as follows:
1. install GD extension
1. download and install the source code package required for the GD Library extension (you can click the source code package to download it directly)
2. Compile and install the source code packages respectively.
Tar zxvf zlib-1.2.3.tar.gz
Tar zxvf libpng-1.5.0.tar.tar
Mv makefile. linux ../makefile
Tar zxvf freetype-2.4.4.tar.gz
Tar zxvf jpegsrc.v8b.tar.gz
Note: configure must include the-enable-shared parameter. Otherwise, the shared library will not be generated.
Install the GD Library
Tar zxvf gd-2.0.33.tar.gz
3. re-compile and install PHP (that is, add the above installation parameters after the PHP parameters previously compiled)
Cd php-5.3.4 (go to the previous PHP source code directory)
The green font part is the parameter previously added when installing PHP.
In this way, the GD Library extension is installed. restart Apache and check the PHP information test page to view the gd items;
II. install MySQLi extension
Phpize is used here. the phpize command is used to prepare the PHP Extension library compiling environment. after you have installed PHP, you will find this command in the bin directory where PHP is installed.
If a prompt such as autoconf cannot be found after the phpize command is executed, install autoconf and execute it again.
The directory path of the following command, please make changes according to the actual situation of your system.
The EXT folder in the PHP source package folder contains the available extensions of the current version. go to the CD and see what you need? You should see the mysqli folder ~~~
After the installation is complete, a message is displayed, indicating the directory path of the extension, such:
The required mysqli. so will be under this directory, then modify the php. ini file under/opt/php/etc/and add the mysqli extension, that is, add the following line:
Extension =/opt/php/lib/php/extensions/no-debug-zts-20090626/mysqli. so
Then restart the Apache service and open the PHP information page again to view the MySQLi item.
Other extensions of PHP are also similar to those installed ....
Http://www.heiok.com /? P = 517
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.