Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

195 questions
1
vote
0 answers

PHP extension mbstring is missing from your system

I am getting this error. laravel/framework v5.4.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. So I followed this: https://stackoverflow.com/a/49087941/14505740 And used sudo apt-get install…
Niklesh
  • 21
  • 4
1
vote
1 answer

Cannot enable mb_string in PHP

I need to use mb_strlen to sort an array of words with diacritics, but PHP does not recognize this function, although mb_string is installed. So, if I say function sortByStrlen($a, $b) { if (mb_strlen($a, "utf-8") === mb_strlen($b, "utf-8")) { …
1
vote
1 answer

Installed mbstring on php 7.1 but phpinfo says it's not installed - CentOS 7

I've installed php-mbstring on Centos 7 with: yum install php-mbstring and everything seemed to go well please see screenshot below. I then went to view the phpinfo() output and searched for "mbstring" and it's not showing up as installed. Anyone…
Glen Elkins
  • 867
  • 9
  • 30
1
vote
0 answers

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/gd2'

I recently bought a new Macbook pro with php 7.1 installed and everything was working fine since I tried to upgrade php to 7.2 using homebrew. When I try to show my version of php with php -v, and it works but it returns me the following warnings :…
Maxime Oger
  • 160
  • 1
  • 8
1
vote
2 answers

Decode string into cyrillic symbols in PHP

I have string like this: Óâàæàåìûé êëèåíò! And want to decode it into cyrillic symbols. I'm already try to decode by mb_convert_encoding, but don't get the proper result. $string = 'Óâàæàåìûé êëèåíò!'; $stringEncode =…
Odin Thunder
  • 3,284
  • 2
  • 28
  • 47
1
vote
1 answer

Composer can not install dependencies

I have a FuelPhp project and i am trying to install dependencies via composer. When i ran composer install on command line, i get following error; The requested PHP extension ext-mbstring ^0.0.0 has the wrong version (7.0.18) installed. Install or…
Nick W
  • 65
  • 1
  • 2
  • 11
1
vote
1 answer

mb_ereg_search_init working as single-byte?

Check this snippet: mb_internal_encoding("UTF-8"); mb_regex_encoding("UTF-8"); mb_ereg_search_init('καλημέραCCC', 'C+'); $pos = mb_ereg_search_pos(); echo $pos[0]; (Please don't comment on this specific example, it's not my use case, it's a…
Lea Verou
  • 23,618
  • 9
  • 46
  • 48
1
vote
1 answer

Compiling PHP with extensions

Can anyone give me any pointers on why the following ./configure settings do not appear to actually affect my build of PHP? Details: php-5.3.5 Compiling in order to use php-cgi on a per-domain basis For example, my ./configure looks like…
Tanner Perrien
  • 3,133
  • 1
  • 28
  • 35
1
vote
1 answer

mbstowcs_s function retsize sometimes return input length + 1

I'm using VisualStdio 2010 on Windows 7. I want to decrypt password using function and display result of decryption as TCHAR*. Implementation here, #include #include #include char* _decrypt_password_v1(const char*…
AleXelton
  • 767
  • 5
  • 27
1
vote
0 answers

How to install php7-mbstring in MAMP php 7.0.15

How to install mbstring in Mac OS for PHP 7.0.15 is maintained by MAMP? I tried to use sudo port, it does not work
Gagamerov
  • 43
  • 1
  • 7
1
vote
1 answer

UTF-8 to UTF-16, different results using iconv vs mbstring

I'm getting different results in php when using iconv vs mb_convert_encoding when trying to convert UTF-8 to UTF-16. echo iconv('UTF-8', 'UTF-16', 'test'); // ��test echo mb_convert_encoding('test', 'UTF-16', 'UTF-8'); // test Notice the two �…
AnthonyRyan
  • 153
  • 1
  • 7
1
vote
1 answer

php mb_convert_variables RECURSION error

I'm having a problem on converting some arrays to UTF-8 Basically I'm extracting meta tags from website, and where the charset is not UTF-8, I attempt to convert them to UTF-8 so they can be stored and displayed properly. A original array before…
Someone Special
  • 12,479
  • 7
  • 45
  • 76
1
vote
0 answers

php mbstring mcrypt mysql login issue

I feel like I'm losing my mind. Hoping someone can point me in the right direction. I built an oop login/registration system following this tutorial PHP OOP Login/Register system Everything was working perfectly until yesterday. I had to rebuild…
cnapsys
  • 121
  • 12
1
vote
1 answer

PHP extension is enabled but not working

I'm working on a Laravel project which is hosted on a remote server. When I run the project I get following error: vendor/laravel/framework/src/Illuminate/Support/Str.php line 160: Call to undefined function Illuminate\Support\mb_strimwidth() So I…
Janaka Dombawela
  • 1,337
  • 4
  • 26
  • 49
1
vote
0 answers

Could Replacing current version of php-common Cause Any Issues?

I am trying to install mbstring in CentOS final release 5.6 (final). However, I get this error: Missing Dependency: php-common = 5.1.6-45.el5_11 is needed by package php-mbstring-5.1.6-45.el5_11.x86_64 (updates) I understand that I have to install…
Carlos Aleman
  • 101
  • 3
  • 11