Cài đặt mbstring module

Tác giả admin+, T.Ba 13, 2011, 01:59:10 SÁNG

« Chủ đề trước - Chủ đề tiếp »

0 Thành viên và 2 Khách đang xem chủ đề.

Cài đặt mbstring module


Mbstring là phần mở rộng không phải được mặc định kèm theo trong PHP. Vì vậy bạn cần install thêm module này nếu cần sử  dụng nó.

1.Kiểm tra xem đã install module này chưa?

Mã nguồn [Chọn]
root@dcuong#yum search mbstring

Nếu đã install rồi sẽ cho ban thấy các thông tin sau đây;

Mã nguồn [Chọn]
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror-fpt-telecom.fpt.net
* updates: mirror-fpt-telecom.fpt.net
* addons: mirror-fpt-telecom.fpt.net
* extras: mirror-fpt-telecom.fpt.net
lxlabsupdate                                                                                                                           |  951 B     00:00
lxlabslxupdate                                                                                                                         |  951 B     00:00
base                                                                                                                                   | 2.1 kB     00:00
updates                                                                                                                                | 1.9 kB     00:00
addons                                                                                                                                 |  951 B     00:00
extras                                                                                                                                 | 1.1 kB     00:00
====================================================================== Matched: mbstrin ======================================================================
php-mbstring.i386 : A module for PHP applications which need multi-byte string handling


2. Cài đặt nhé

Mã nguồn [Chọn]
root@dcuong#yum install php-mbstring

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Package php-mbstring.i386 0:5.1.6-20.el5_2.1 set to be updated
–> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
php-mbstring            i386       5.1.6-20.el5_2.1  updates           969 k

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 969 k
Is this ok [y/N]:

Gõ y (oh yeah) nhấn enter luôn á

Downloading Packages:
(1/1): php-mbstring-5.1.6 100% |=========================| 969 kB    00:57
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: php-mbstring                 ######################### [1/1]

Installed: php-mbstring.i386 0:5.1.6-20.el5_2.1
Complete!


3. Khởi động lại Apache để được load thêm module này

Mã nguồn [Chọn]
root@dcuong#service httpd restart

Vậy là xong. Bây giờ chạy được function Mbstring rồi.