Hobbies And Interests

How to Disable PHP Multibyte Strings

In PHP, alphanumeric strings can be encoded as multibyte strings, where the characters in the string may exceed 256 unique values -- making parsing them difficult as the code has to take this special property into consideration. You can set a flag in your PHP code that will disable multibyte strings, which can help simplify your coding procedures. However, this may lead to compatibility issues if your code tries to process a multibyte string, as it will fail and error out upon doing so.

Instructions

    • 1

      Log in to your server that is hosting your PHP installation.

    • 2

      Type "vim /etc/php5/php.ini" and press "Enter" to open your PHP configuration file.

    • 3

      Scroll through the configuration file until you find the line that says "--enable-mbstring."

    • 4

      Delete this line from your PHP configuration, press "ESC" then type "ZZ" to save and exit the file.

    • 5

      Restart the server to apply the setting change by typing "/etc/init.d/apache2 restart" on the command line, and then press "Enter."


https://www.htfbw.com © Hobbies And Interests