One, Linux host installation mbstring Extension Library Guide (source installation)
The following command is entered at the command line:
1, use the CD command to enter the source code directory of PHP under the etc/mbstring directory, such as "/src/php5.2.5", that is, "cd/src/php5.2.5";
2. Implementation
#/usr/local/php/bin/phpize (assuming PHP is installed in the/usr/local/php directory)
3. Implementation
#./configure--with-php-config=/usr/local/php/bin/php-config
4. Execute make && make install
5, after the system will prompt you mbstring.so file directory. Copy the past from the directory pointed to by the Extension_dir indicated in php.ini. or copy the mbstring.so to the/usr/local/php/ext directory, in the hand configuration parameter extension_dir= "/usr/local/ Php/ext "points to the directory where mbstring.so resides.
6, modify php.ini, add a sentence extension=mbstring.so
Then restart Apache: Run/service httpd Restart to complete the installation.
Second, Linux host installation mbstring Extension Library Guide (RPM installation)
If you're using Linux's own Apache+php+mysql,
Command:
#rpm-Q php (get PHP version number)
Then download php-mbstring:
Note PHP-MBSTRING-4.3.9-3.15.I386.RPM Here the version number is can be changed, only need to change to your PHP version number can be
Installation:
#rpm-IVH php-mbstring-4.x.x-x.xx.i386.rpm
And then restart Apache.
Third, set
PHP's setup file is/etc/php.ini. In this example, the UTF-8 encoding is set as an example.
#vi php.ini
Set the output handler to the mbstring counterpart.
; Output_handler =
--Output_handler = "Mb_output_handler"
Set the text set to UTF-8.
;d efault_charset = "Iso-8859-1"
--Default_charset = "UTF-8"
Set the language of mbstring to Chinese
; mbstring.language = Japanese
--Mbstring.language = Chinese
Set the internal encoding for mbstring to UTF-8.
; mbstring.internal_encoding = EUC-JP
--mbstring.internal_encoding = UTF-8
The input text encoding of the mbstring is set to automatic discrimination.
; mbstring.http_input = Auto
--Mbstring.http_input = auto
Set the mbstring output text encoding to UTF-8.
; mbstring.http_output = SJIS
--Mbstring.http_output = UTF-8
Activates the mbstring text encoding auto-transform mode.
; mbstring.encoding_translation = Off
Mbstring.encoding_translation = On