Php5.2.13 environment, does not support mbstring Extension
Assume that the PHP source code package is in the/usr/local/src/php-5.2.13
The PHP installation directory is/usr/local/PHP.
CopyCode The Code is as follows: # cd/usr/local/src/php-5.2.13/EXT/mbstring/
# Rpm-Qa | egrep "Autoconf | GCC": Check whether these components are installed. If these components are not installed, run the following statement. Otherwise, an error is reported.
# Yum-y install Autoconf GCC gcc-C ++
# Phpize
#./Configure -- With-PHP-Config =/usr/local/bin/PHP-config
# Make
# Make install
After execution, add extension = mbstring. So to PhP. ini.
Restart the Web server. Check that phpinfo should support mbstring!
1. Install Crul Copy codeThe Code is 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 and generate extensions
Enter the PHP SourceProgramThe ext directory in the directory storesSource codeSelect the required module, such as the curl module:
CD curl
Execute phpize to generate the compilation file. phpize is in the bin directory of the PHP installation directory.
/Usr/local/PhP5/bin/phpize
During running, the following error may be reported: 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)
Generate a configuration file and compile the 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 file in (for example:/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 extension directory:
Extension_dir = "/usr/local/PhP5/extensions /"
Add extension module reference:
Extension = curl. So
4. Check and restart Apache
/Usr/local/PhP5/bin/PHP-V
When executing this command, PHP will check whether the configuration file is correct. If there is a configuration error, an error will be reported here. You can troubleshoot it based on the error information.