Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

195 questions
110
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
  • 2,133
  • 3
  • 15
  • 29
70
votes
15 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
  • 701
  • 1
  • 5
  • 3
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,528
  • 3
  • 17
  • 25
59
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
  • 5,324
  • 5
  • 35
  • 37
56
votes
10 answers

How can I write a 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
  • 842
  • 1
  • 6
  • 9
53
votes
13 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,843
  • 8
  • 48
  • 94
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
  • 571
  • 1
  • 4
  • 4
46
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
  • 12,014
  • 19
  • 67
  • 111
44
votes
7 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
  • 10,424
  • 9
  • 50
  • 66
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
29
votes
5 answers

call to undefined function mb_strimwidth

Months ago I made a short code that uses mb_strimwidth() to exactly fit some text into a table cell, putting dots at the end of a truncated string. Now, after some times, I tried to execute that same code and it went out with this error: Fatal…
Yuri
  • 3,082
  • 3
  • 28
  • 47
28
votes
9 answers

Wordpress theme upload error PCLZIP_ERR_BAD_FORMAT

I'm new to php as well as wordpress however because of some need I had to work with wordpress only. So just to start I read a tutorial and created a wordpress theme of my own and when I tried to upload my theme I got the below error: The package…
dShringi
  • 1,497
  • 2
  • 22
  • 36
26
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
  • 271
  • 1
  • 3
  • 3
22
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
  • 373
  • 1
  • 3
  • 6
22
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
  • 66,732
  • 177
  • 439
  • 641
1
2 3
12 13