Solved

enable or install PHP extension "mbstring"

Posted on 2011-09-09
7
2,401 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now