Environment php5.2.13, mbstring extension not supported
If PHP's source package is in/usr/local/src/php-5.2.13
The PHP installation directory is/usr/local/php
Copy Code code as follows:
# cd/usr/local/src/php-5.2.13/ext/mbstring/
# rpm-qa|egrep "AUTOCONF|GCC" This is to detect whether these components are installed, do not install the following sentence, or you will be the error
# yum-y Install autoconf gcc gcc-c++
# phpize
#./configure--with-php-config=/usr/local/bin/php-config
# make
# make Install
Add extension=mbstring.so to php.ini after execution
Restart the Web server, look at the phpinfo, should support mbstring!
1. Install Crul
Copy Code code as follows:
wget http://curl.haxx.se/download/curl-7.19.6.tar.gz
TAR-ZXVF curl-7.19.6.tar.gz
CD curl-7.19.6
./configure--prefix=/usr/local/curl
Make
Make install
2. Compile build Extension
into the PHP source directory in the Ext directory, where the source code for each extension module, select the module you need, such as Curl module:
CD Curl
Execute phpize Build compilation file, Phpize in the bin directory of the PHP installation directory
/usr/local/php5/bin/phpize
Run, you may have an error: Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf
environment variable is set correctly and then rerun this script., you need to install autoconf:
Yum Install autoconf (redhat or CentOS) apt-get install autoconf (Ubuntu Linux)
Build the configuration file and compile the build module:
/usr/local/php5/bin/phpize
./configure--with-curl=/usr/local/curl--with-php-config=/usr/local/php5/bin/php-config
Make
Make install
Generated files in (such as:/usr/local/php5/extensions/no-debug-non-zts-20090626/)
In this way, curl.so is copied to the PHP directory (for example:/usr/local/php5/extensions/)
3. Modify Configuration
In PHP.ini, set the extended directory:
Extension_dir = "/usr/local/php5/extensions/"
and add Extension module references:
Extension = curl.so
4. Check and restart Apache
/usr/local/php5/bin/php-v
Execute this command, PHP will check the configuration file is correct, if there is a configuration error, there will be an error, can be based on the wrong information to troubleshoot