Cannot Initialize Mbstring with PHP 7

Cannot Initialize mbstring with PHP 7

A solution was reached with the following method:

I put extension=mbstring.so inside php.ini even though that is no longer the method PHP uses by default to load modules.

From php.ini itself:

Note: packaged extension modules are now loaded via the .ini files found in the directory /etc/php.d; these are loaded by default.

It seemed to fix my problem. I would still be interested to hear if anyone else has a different take on this matter.

the requested PHP extension mbstring is missing from your system

-- EDIT BASED ON NEW INFORMATION --

Since this is Windows, re-installing PHP, enabling the extension in the PHP.INI file, and restarting the Webserver, should work.

-- PREVIOUS SOLUTION FOR LINUX --

You need to install mbstring for php.

Use:

 sudo apt-get install phpX.X-mbstring

Where X.X is your version number of PHP.

mb_convert_encoding, undefined function while mbstring is enabled

A lot of newer Linux servers do not have PHP Multibyte modules installed by default. A simple solution is often to install php-mbstring.

On Red Hat flavors (CentOS, Fedora, etc.) you can use yum install php-mbstring.

Make sure you restart your Apache server afterwards. Use service httpd restart on RH flavors.

PHP Startup: unable to initialize module

http://windows.php.net/download/

  • Download the zip file for VC9 x86 Thread Safe (which is for PHP run as Apache module).
  • Extract the contents of the zip somewhere
  • Stop apache
  • Backup the php.ini file you have in your current PHP directory ../php5.3.0/
  • Delete (or backup) the rest of the contents you have in ../php5.3.0/
  • Place the extracted content in ../php5.3.0/
  • Put php_mongodb.dll in ../php5.3.0/ext/
  • Put php.ini back also
  • Restart Apache

edit:
Sorry, I forgot to mention that you also need to replace your apache install with the one from apachelounge as well, and have Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed, as per the remarks in "Which version do I choose?" on the same page http://windows.php.net/download/



Related Topics



Leave a reply



Submit