I needed to install support for mbstring, as it was required by a client hosted on one of the servers running on CentOS 5.5.
Installation is quite straight forward as php-mbstring rpm package is available, here is how to install mbstring:
[root@centos [~]#yum install php-mbstring
Further on a restart of Apache or Litespeed and the mbstring support is loaded in php.
On some OpenVZ CentOS virtual servers enabling the php-mbstring might require also a complete php recompile if php is not build with the –enable-mbstring
If thus the mbstring has to be enabled on an OpenVZ server with php precompile, this can be easily done with cpeeasyapache , like so
server: ~# cd /home/cpeasyapache/src/php-5.2.9
server: php-5.2.9# cat config.nice |head -n $(($(cat config.nice |wc -l) - 1)) >> config.nice.new;
server: php-5.2.9# echo "'--enable-mbstring' " >> config.nice.new; echo '"$@"' >> config.nice.new
server: php-5.2.9# mv config.nice config.nice.orig; mv config.nice.new config.nice
After that follow the normal way with make, make install and make install modules , e.g.:
server: php-5.2.9# make && make install && make install modules
Next the php-mbstring is enabled enjoy 😉