It is required to have PHP enabled with mbstring (multi-byte string) support for storing and displaying multi-byte characters in PHPKB software. The installation wizard of the multi-language editions of PHPKB knowledge base software will automatically detect if you have PHP enabled with mbstring support. If it is not enabled, you may get an error that says:
Please refer to the tutorial below on how to enable mbstring on your server.
When we manipulate (trim, split, splice, etc.) strings encoded in a multi-byte encoding, we need to use special functions since two or more consecutive bytes may represent a single character in such encoding schemes. Otherwise, if we apply a non-multibyte-aware string function to the string, it probably fails to detect the beginning or end of the multibyte character and ends up with a corrupted garbage string that most likely loses its original meaning.
So, mbstring provides multibyte-specific string functions that help us deal with multibyte encodings in PHP. In addition to that, mbstring handles character encoding conversion between the possible encoding pairs. mbstring is designed to handle Unicode-based encodings such as UTF-8 and UCS-2 and many single-byte encodings for convenience.
Please note that "mbstring" is a non-default PHP extension. This means it is not enabled by default.
You can find out if this module is installed or not by looking at the list that is produced by this command
If you don’t have this installed on a Linux machine and if you have installed PHP from yum then run this command as a superuser. The command depends on your operating system.
After that, you will need to restart your Apache service using the following command:
If you have access to the php.ini, just remove the semicolon character (;) in front of the line below.
Once you have made the changes, don’t forget to restart your web server for the change to take effect.
Note: PHP extensions are not just enabled from php.ini file. First, you need to install that specific extension, i.e. place its DLL file "php-mbstring.dll" into the "/php/ext/" directory if it is not already present there. When you do that, make sure you have the correct build of DLL file. 32-bit, thread-safe PHP binary, built using VC9 for example, would only work with DLL files built using exact same tools and configuration: 32-bit, using VC9, with thread-safety turned on. And of course PHP API version also needs to match. If it doesn’t, once you restart the web server, you will receive ’Error 500 - Server error’ message.
Below is a sample excerpt from php.ini file which contains the configuration of mbstring variables.
Article ID: 46
Created: February 6, 2013
Last Updated: March 4, 2022
Author: Ajay Chadha [support@phpkb.com]
Online URL: https://www.phpkb.com/kb/article/how-to-enable-mbstring-in-php-46.html