?
Solved

enable or install PHP extension "mbstring"

Posted on 2011-09-09
7
Medium Priority
?
2,935 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 7

Accepted Solution

by:
boon86 earned 1336 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 664 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 7

Assisted Solution

by:boon86
boon86 earned 1336 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Suggested Courses

770 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