X
    Categories: PHP

Install PHP Mbstring

Install PHP Mbstring

PHP Mbstring => PHP Multibyte String. I am using Laravel framework for my application. I want to call Cron to check and delete some unwanted datas from table once a day.  Have implemented cron file in laravel and set cron in my Cpanel. But When it runs I got the following error message,
{“error”:{“type”:”Symfony\\Component\\Debug\\Exception\\FatalErrorException”,”message”:”Call to undefined function Symfony\\Component\\Console\\mb_convert_variables()”,”file”:”\/home\/stagingreme\/public_html\/vendor\/symfony\/console\/Symfony\/Component\/Console\/Application.php”,”line”:1154}}
But When I try to run Cron command in terminal Its works. So there in no mistake with my code side. After long research I have found PHP Mbstring extension is missing in my server. mb_convert_variables() is one of the calling function of Mbstring extension.

Checkout How to Create CRON JOB IN LARAVEL

I am using WHM. By using PUTTY or Remote Connection I have logged in as a root user and tried to install mb string by using below commands :

sudo yum install php55-mbstring

Yum install install php-mbstring

But Nothing works Its gives error message like no packages found.

After Few more research have found the following Steps to Achieve It.

In order to enable MBString, in your WHM/CPanel you need to complete the following steps:

1. Login to WHM as root
2. Go to Software -> EasyApache
3. If prompted to upgrade, do so then repeat step 2
4. Begin customizing based on the current profile
5. Proceed through the screens until you get to “Step 5”
6. On “Step 5,” click on “Exhaustive Options”
7. Under PHP, check the checkbox for MBString
8. Proceed with Build & Compile Process
9. Make sure you wait for the build to complete.


Then Check your PHP info you can find mbstring there is enable.

Thats it Now you have enabled mbstring for your application
Hope it will help someone.

 

Marimuthu: