Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install php mbstring extension in to Nginx Ubuntu

I need this php extension in order to use one of my Magento extension. How do I install php mbstring extension to my Nginx Ubuntu 14.04?

like image 944
n01 Avatar asked Feb 27 '15 14:02

n01


1 Answers

STEP 1 - Installing mbstring

PHP mbstring extension is not enabled by default as stated in PHP docs. Try these:

PHP 5:

sudo apt-get install php5-mbstring

PHP 7:

sudo apt-get install php7.0-mbstring

Now you should see mbstring as enabled in a file with below code (check above FelixEve's answer):

<?php echo phpinfo(); ?>

You might need to use the right extension name for your PHP version:

For example:

  • for PHP 5.6: sudo apt-get install php5.6-mbstring
  • for PHP 7.1: sudo apt-get install php7.1-mbstring

STEP 2 - Restart you server:

After the installation of mbstring, you may need to restart your server (apache2 / nginx etc). Just use the following command.

sudo service apache2 restart
or
sudo service nginx restart
like image 96
Ajeet Shah Avatar answered Sep 18 '22 15:09

Ajeet Shah