Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

180 questions
104
votes
4 answers

Composer - the requested PHP extension mbstring is missing from your system

I've recently tried to install package through Composer, but I have got an error the requested PHP extension mbstring is missing from your system. I removed semicolon from php.ini, but it still doesn't work. What should I do?
Jozef Cipa
  • 1,865
  • 3
  • 12
  • 25
65
votes
7 answers

utf8_(en|de)code removed from php7?

I recently switched to PHP 7 on my development server, which has worked just fine - until now. Since I updated to PHP 7.0.3-10+deb.sury.org~trusty+1 (earlier today), the utf8_decode and utf8_encode functions are no longer accessible. They were,…
paolo
  • 2,304
  • 3
  • 13
  • 25
64
votes
14 answers

phpMyAdmin Error: The mbstring extension is missing. Please check your PHP configuration

I have a problem running phpMyAdmin. When I try to access phpMyAdmin in my browser, I get the error message: "The mbstring extension is missing. Please check your PHP configuration." I have already searched on the internet for possible solutions.…
Klemen Rejec
  • 641
  • 1
  • 5
  • 3
56
votes
11 answers

How to install PHP mbstring on CentOS 6.2

How do I install mbstring with PHP on CentOS 6.2 I've tried: $ sudo yum install php-mbstring Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: mirror.net.cen.ct.gov * extras: centos.aol.com * updates:…
alioygur
  • 4,816
  • 5
  • 30
  • 34
51
votes
11 answers

How to write file in UTF-8 format?

I have bunch of files that are not in UTF-8 encoding and I'm converting a site to UTF-8 encoding. I'm using simple script for files that I want to save in utf-8, but the files are saved in old encoding: header('Content-type: text/html;…
Starmaster
  • 792
  • 1
  • 5
  • 9
49
votes
11 answers

Fatal error: Call to undefined function mb_detect_encoding()

I receive this error after trying to set up LAMP by following this tutorial, and I find myself receiving the above error after trying to set up phpmyadmin. Fatal error: Call to undefined function mb_detect_encoding() in …
Louis93
  • 3,609
  • 8
  • 43
  • 86
47
votes
31 answers

phpMyAdmin mbstring error

Whenever I try to enter my phpMyAdmin, it gives me this error: The mbstring extension is missing. Please check your PHP configuration. I've looked all over the Internet for a fix, but all I've found is errors similar to mine, but not the same, or…
user1930852
  • 471
  • 1
  • 4
  • 4
39
votes
8 answers

Multibyte trim in PHP?

Apparently there's no mb_trim in the mb_* family, so I'm trying to implement one for my own. I recently found this regex in a comment in php.net: /(^\s+)|(\s+$)/u So, I'd implement it in the following way: function multibyte_trim($str) { if…
federico-t
  • 11,157
  • 16
  • 58
  • 108
37
votes
6 answers

Unable to call the built in mb_internal_encoding method?

I'm trying to install indefero on a CentOS 5.3 VMware 'box' and I ran into a problem. Quite early in the installation I get an error that I've been able to narrow down to this: [root@code /var/www/html]# cat x.php
Niels Basjes
  • 9,714
  • 8
  • 45
  • 60
34
votes
2 answers

Dependency issue trying to install php-mbstring on ec2

I am trying to install yii2 on my Amazon Linux AMI instance, it requires the php-mbstring extension to work. When I tried to run sudo yum install php-mbstring it returned this error: Error: php56-common conflicts with…
Bob Lin
  • 343
  • 1
  • 4
  • 7
22
votes
7 answers

Detect if mbstring is enabled or not from PHP script

How can I check if the mbstring extension is loaded in a php script?
Jayakrishnan
  • 231
  • 1
  • 2
  • 3
21
votes
2 answers

PHP mb_substr() not working correctly?

This code print mb_substr('éxxx', 0, 1); prints an empty space :( It is supposed to print the first character, é. This seems to work however: print mb_substr('éxxx', 0, 2); But it's not right, because (0, 2) means 2 characters...
Alex
  • 60,472
  • 154
  • 401
  • 592
18
votes
2 answers

PHP Security: how can encoding be misused?

From this excellent "UTF-8 all the way through" question, I read about this: Unfortunately, you should verify every submitted string as being valid UTF-8 before you try to store it or use it anywhere. PHP's mb_check_encoding() does the trick,…
User402841
  • 84
  • 3
  • 16
  • 37
17
votes
3 answers

What do these PHP mbstring settings do?

I'm trying to figure out exactly what these php.ini settings do. What happens when they're set to different values? When are they necessary? When are they…
JW.
  • 47,690
  • 30
  • 108
  • 133
16
votes
1 answer

How to enable mbstring from php.ini?

I have real difficulties with enabling mbstring extension on my localhost. I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation and various other examples I found online. After…
radu_m
  • 313
  • 1
  • 3
  • 6
1
2 3
11 12