The parameters behind the root are the modules we want, but as we work, we need to add some modules and we don't want to recompile PHP, so we can use phpize.
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.
------------------------------------
# If you forget to add some modules at compile time, you can use this method to recompile the additions!
# First, go to the PHP directory (not compiled) extension directory
cd/home/soft/php-5.2.14/ext/ftp/
# Call the Phpize program to generate the compilation configuration file
# Find/-name Phpize
/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20041225
Zend Module Api no:20060613
Zend Extension Api no:220060519
# Compile the extension library
/configure–with-php-config=/usr/local/php/bin/php-config
Make
# After successful execution, the resulting extension library file is in the modules subdirectory of the current directory
# Edit the php.ini document, locate the Extension_dir directory, and copy the compiled extension file to extension
Vim/usr/local/php/etc/php.ini
# line No. 491
# 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/
# in the Add Extension library location in php.ini, set the extension library to be added.
# Add extension=ftp.so at 612
# Restart WebService
------------------------------------------------------
181 of the PHP source location in
/root/software/php-5.3.6
----------------------------------------
This two-day attempt to install a Xenforo forum on the above platform, the installation started with the following information:
The following errors occurred while verifying that your server can run Xenforo:
* The required PHP extension mysqli could not be found. Please ask your the host to install the this extension.
* The required PHP extension GD could not be found. Please ask your the host to install the this extension.
Since PHP is compiled and installed by source code, the above two extensions are not installed, the following is the process of adding these two extensions for PHP:
First, install GD extension
1. Download the installation of the GD Library extension required source package (click the source package to download directly)
2. Compile and install each source package separately
Installing zlib
Tar zxvf zlib-1.2.3.tar.gz
CD zlib-1.2.3
./configure
Make
Make install
Installing libpng
Tar zxvf Libpng-1.5.0.tar.tar
CD libpng-1.5.0
CD scripts
MV Makefile.linux. /makefile
Cd..
Make
Make install
Installing FreeType
Tar zxvf freetype-2.4.4.tar.gz
CD freetype-2.4.4
./configure
Make
Make install
Install JPEG
Tar zxvf jpegsrc.v8b.tar.gz
CD jpeg-8b
./configure–enable-shared
Make
Make Test
Make install
Note that this configure must take the –enable-shared parameter, otherwise, the shared library will not be generated
Installing the GD Library
Tar zxvf gd-2.0.33.tar.gz
CD gd-2.0.33
./configure–with-png–with-freetype–with-jpeg
Make install
3. Recompile the installation of PHP (that is, after the previous compilation of PHP parameters, plus the above installation parameters)
CD php-5.3.4 (into the previous PHP source directory)
The Green Font section is the parameter that was added when PHP was previously installed
Make
Make install
So the GD library extension will be installed, restart Apache, view the PHP information test page can see the GD item;
Second, install mysqli extension
Here to use the Phpize,phpize command is used to prepare the PHP Extension Library compilation environment, usually after you install PHP, will be installed in the bin directory of PHP to find this command.
If you do not see a hint like autoconf after you execute the phpize command, install the autoconf again and execute again.
The directory path of the following instructions, please users according to the actual situation of their system to make corresponding changes.
PHP Source Package folder under the Ext folder is the current version of the available extensions, CD in to see what you need? You should see the Mysqli folder.
After the installation is complete, you will be prompted to expand the directory path, such as:
/opt/php/lib/php/extensions/no-debug-zts-20090626
The required mysqli.so will be in this directory, next modify the php.ini file under/opt/php/etc/, add the mysqli extension, that is, add the following line:
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.