Solved

enable or install PHP extension "mbstring"

Posted on 2011-09-09
7
2,565 Views
Last Modified: 2012-05-12
Hi,

I'm wondering how would enable or install PHP extension "mbstring"? I have a Centos machine 5.x. I have a VPS with cPanel and WHM. Do I do this through WHM or should I use SSH and command line operations? If so, what command do I use to enable or install? Or where would I go through the WHM to enable it?

Much thanks,
Victor
0
Comment
Question by:Victor Kimura
  • 3
  • 3
7 Comments
 
LVL 7

Accepted Solution

by:
boon86 earned 334 total points
ID: 36512811
Hi,

You can do it by using Easy Apache inside your whm panel:

1. You can access EasyApache by going to the Software section of WHM and clicking on EasyApache. Command-line folks can just use /scripts/easyapache.

2. If you're asked to update, do so then come back to this screen. Updates often contain enhancements to allow EasyApache to support updated technologies.

3. On the first screen ("1. Profile"), select "Previously Saved Config (** DEFAULT **)" and then click on "Start customizing based on profile."

This setting will display your current settings throughout the rest of the EasyApache interface. This way you don't need to lookup what your current configuration is, you just change the items you want to have changed (e.g. adding mbstring support to PHP)

4. Continue clicking "Next" until you get to "5. Short Options List" then click "Exhaustive Options List" at the bottom of the page.

5. Under PHP, check the checkbox for "Mbstring" then click "Save and Build"

6. Follow any further on-screen instructions that appear.

The cool thing about EasyApache is that it will ensure everything will work before attempting to apply it to your server. In the relatively rare event that something fails, your current configuration is restored and you will be prompted to allow us to investigate what happened so we can resolve the issue.

hope that help
0
 
LVL 9

Assisted Solution

by:ghodder
ghodder earned 166 total points
ID: 36515887
Sounds like a lot of trouble for something that can be done with 1 command:

yum install php-mbstring

Open in new window

0
 

Author Comment

by:Victor Kimura
ID: 36516005
Hi ghodder,

Will that work and not have any effects on WHM/cPanel? I'm only familiarizing myself with WHM.

The other question is that I assume this will install it as a module rather than being compiled. Correct?

Thanks,
Victor
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 7

Assisted Solution

by:boon86
boon86 earned 334 total points
ID: 36516026
please read: http://www.webhostingtalk.com/showthread.php?t=664398

i dont think : yum install php-mbstring

will work for whm/cpanel server as php  already disabled
inside yum.conf

you will need to use easyapache
0
 

Author Comment

by:Victor Kimura
ID: 36516082
Hi boon86,

Thanks for those links. That's helpful. I'm wondering if anyone has tried the following as an option to add in extensions like so:
CUSTOM_PHP_FLAGS="--with-xsl" /scripts/easyapache

Advanced users can use
FULL_CUSTOM_PHP_FLAGS="'--with-xsl' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pgsql=/usr' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-wddx' '--with-xmlrpc' '--with-zlib'" /scripts/easyapache

Can somebody confirm for me the operation of "CUSTOM_PHP_FLAGS" and "FULL_CUSTOM_PHP_FLAGS" within the cPanel environment?

Am I correct in assuming that if I specify --with-xsl via CUSTOM_PHP_FLAGS, will this simply add that flag to anything I choose in easyapache, where FULL_CUSTOM_PHP_FLAGS will override ALL php flags chosen in easyapache?

The above was from http://www.webhostingtalk.com/archive/index.php/t-565940.html

The other option was this:
Edit /home/cpapachebuild/buildapache/buildscript
There are about a dozen lines that start with ./configure and have all of the php options as listed in my original post. add --with-xsl to the end of all of them.
Execute this -

sh /home/cpapachebuild/buildapache/buildscript

Has anyone tried them personally? Which one is safer/faster?

Thanks,
Victor
0
 
LVL 7

Expert Comment

by:boon86
ID: 36516241
not sure about --with-xsl maybe you can try and let us know what did you get
0
 

Author Comment

by:Victor Kimura
ID: 36526899
I didn't try this option: CUSTOM_PHP_FLAGS="--with-xsl" /scripts/easyapache

I just ran easyapache and went through the process. I did run into a build problem which I'm trying to resolve now with cPanel. I submitted a ticket and they respond fairly quickly. I hope and pray that it'll be resolved quickly too. =)

Thanks for your replies.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question