Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Exclamation How to add mbstrings using cPanel?

    Our existing environment:
    WHM 11.11.0 cPanel 11.15.0-R18264
    CENTOS 4.5 i686 on virtuozzo - WHM X v3.1.0

    We have installed PHP app on our server and when attempting to run it received the following error: Fatal error: Call to undefined function: mb_ereg_replace() in /home/spf/public_html/dolphin/inc/utils.inc.php on line 120

    After researching this error it seems that we must recompile PHP to add mbstrings extension.

    Can someone please provide detailed instructions on how to do this?

    Please help.

    Thank you,
    Jake

  2. #2
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    Sure,

    The easiest way for you would be to simply compile apache.

    whm > software > apache update

    1. If you are not sure what to select, use " start customizing based on profile"
    2. chose the apache version, your current version should be pre-selected, hit next step.
    3. Your current php main version should be pre-selected, hit next step.
    4. Your current php minor version should be pre-selected, hit next step.
    5. Under basic options, click 'advanced configuration'
    6. From this list you can select your desired modules. Be sure that 'unique ID' is selected as well.

    jay

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Cool

    Thank you very much Jay.

    I did the following yesterday and all hell broke lose.

    I went to PHP admin and edited the advanced config and selected the mb_strings. Then I ran the Apache Update.

    Afterwards non of the PHP websites, like Joomla worked. They all said that they could not connect to database. I reran the Apache Update without mb_strings selected, but that did not make any difference.

    I was lucky that the backup was there, so I ran the restore command and restored the apache config from the backup. That partially fixed the problem. I also had to delete all .htaccess config files from each website root directory, which finally put everything back to normal.

    I don't know what happened or why I had to do what I did.

    I am paranoid now! Any insights as to why and what to do?

    Thank you,
    J

  4. #4
    Member
    Join Date
    Mar 2006
    Posts
    1,215

    Default

    perhaps someone can offer some help. I would suggest reading through some EA3 threads as there may be too many variables to consider without seeing your logs.

    I didn't experience this even on many vps upgrades to apache 2.2.

    Good luck with it, your next option may be to compile php manually. Its not that difficult. Search around, you will find many tutorials on it. I still recommend using EA3 because sooner or later you will need to use it regardless.

  5. #5
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Question

    Totally ignorant. What is EA3 and where do I look?

  6. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,718
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by yashax View Post
    Totally ignorant. What is EA3 and where do I look?
    If you are on one of the latest builds of EDGE, CURRENT or RELEASE, you can find EasyApache 3 in the WHM interface by going to the Software section then clicking on Apache Update.

    If you are on STABLE, note that EasyApache 3 has not yet propagated to STABLE. You would still be on EasyApache 1.

  7. #7
    Registered User
    Join Date
    Mar 2007
    Posts
    4

    Question

    Before I run the Apache Update and check MBSTRINGS option, what files can I backup manually to ensure that incase it does not work, I can easily recover?

    Also, for my understanding, if I check MBSTRINGS and run a compile process and all PHP sites do not work, after I restore the Apache config by using the command line restore utility, does that UNDO the MBSTRNGS compilation? Cna I restore the Apache config without undoing the MBSTRINGS?

    What do I need to do to ensure that MBSTRINGS still stays there?

    Please help.

    Thank you,
    Jake

  8. #8
    Member darren.nolan's Avatar
    Join Date
    Oct 2007
    Posts
    259

    Default

    Updated cPanel last night, and recompiled PHP4/5 with mbstrings & mcrypt (in addition to my other options).

    Ran without a hitch. I suppose had I ran into errors, I would have gone through EA3 again without those two options ticked, my httpd.conf seems pretty awesome in it's ability lately to not break each time apache wants to rewrite it.

Similar Threads & Tags
Similar threads

  1. how to add a cPanel add on script installation
    By fearmydesign in forum cPanel Developers
    Replies: 2
    Last Post: 11-15-2010, 12:06 PM
  2. how to add a cPanel add on script installation
    By fearmydesign in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-15-2010, 12:06 PM
  3. Enable mbregex with mbstrings
    By paul19 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-10-2009, 10:44 AM
  4. DNS Zone Add -> Not displayed at CPanel Accound / Can't add addon-domain
    By Luerssen in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 08-02-2007, 09:50 PM
  5. recompile/reinstall PHP 4.2.3 without mbstrings
    By big in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-09-2002, 06:01 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube