Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

195 questions
3
votes
1 answer

GeoIP function returning 0

I'm working on implementing some geoIP functionality to redirect a user away from my .com site to the relevant country domain (.fr, .es, .co.uk ...etc). I've the following in my index.php to check the users IP: ini_set('display_errors',…
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
3
votes
3 answers

Installed PHP using phpbrew, Now phpmyadmin is giving mbstring extension error

Installed earlier version of PHP on a new Ubuntu installation using phpbrew and now my phpmyadmin is throwing an error. The error reads: The mbstring extension is missing. Please check your PHP configuration. OS: Ubuntu 14.04 LTS I have…
JoeCodeCreations
  • 660
  • 2
  • 6
  • 19
3
votes
3 answers

Corrupted data using UTF-8 and mb_substr

I'm get data from MySQL db, varchar(255) utf8_general_ci field and try to write the text to a PDF with PHP. I need to determine the string length in the PDF to limit the output of the text in a table. But I noticed that the output of…
aLx13
  • 701
  • 5
  • 16
3
votes
1 answer

mb_internal_encoding() not available though configured?

I'm having problem with mbstring in my Apache2.2/Win7/PHP5.3 setup, though I think it's correctly configured in my php.ini: extension_dir = "ext" extension=php_mbstring.dll I get the following: Fatal error: Call to undefined function…
Jonas Byström
  • 25,316
  • 23
  • 100
  • 147
3
votes
3 answers

PHP string functions vs mbstring functions

I have an application that has so far been in English only. Content encoding throughout templates and database has been UTF-8. I am now looking to internationalize/translate the application into languages that have character sets absolutely needing…
Tom
  • 30,090
  • 27
  • 90
  • 124
2
votes
0 answers

php spark serve Uncaught Error: Call to undefined function CodeIgniter\CLI\mb_strpos()

I'm new to PHP and trying to open the CodeIgniter 4 welcome page by using localhost (I don't have any server programs like XAMPP since it's a company computer and PHP works fine with its built-in server.) When I try to run the command: php spark…
2
votes
1 answer

Dependency error when install php-mbstring module on RedHat 7.9 and php 7.2

On centos (7.6), I've a script to deploy a set of php dependencies with yum tools and remi-repo. I need to migrate this installation set on a redhat (7.9). On this distribution, I've this issue during installation of php-mbdstring module. The lib…
YLR
  • 1,503
  • 4
  • 21
  • 28
2
votes
1 answer

Why do I get Error: Missing one or more required components of PHP that MediaWiki needs (mbstring)?

I have mediawiki on my local machine. I have php and php-mbstring installed. When I run phpinfo(), mbstring shows up. I have checked that I have mbstring.ini and mbstring.so, and they are on my machine. When I run php maintenance/update.php I get…
UndoingTech
  • 709
  • 3
  • 16
2
votes
2 answers

how to make a string lowercase without changing url

I'm using mb_strtolower to make a string lowercase, but sometimes text contains urls with upper case. And when I use mb_strtolower, of course the urls changing and not working. How can I convert string to lower without changin urls?
Okan Kocyigit
  • 13,203
  • 18
  • 70
  • 129
2
votes
2 answers

Symfony 4.1 PHP 7.2.10 Notice: iconv(): Wrong charset, conversion from `UTF-8' to `UTF-16BE' is not allowed

Ok, so I have searched other questions without success. I am getting this error on a virtual box, which I cannot alter in any way. MBString is enabled IconV is enabled An exception has been thrown during the rendering of a template ("Notice:…
JMcCr
  • 21
  • 1
  • 2
2
votes
0 answers

How to install mbstring in Ubuntu 17.04?

I have php version 7.0.22. I tried doing sudo apt-get install mbstring , sudo apt-get install php-mbstring , sudo apt-get install php7.0-mbstring but every time it says Unable to locate package mbstring Please help.
sam
  • 175
  • 1
  • 1
  • 10
2
votes
1 answer

In PHP 5.6, does mbstring.encoding_translation serve any purpose anymore?

In PHP 5.6 the following configuration variables have been deprecated: mbstring.internal_encoding mbstring.http_input mbstring.http_output Instead we are told that PHP 5.6 and later users should leave these empty and set default_charset instead.…
Daniel
  • 2,869
  • 4
  • 26
  • 28
2
votes
1 answer

mbstring - what's the purpose of using mb_language('uni'); mb_internal_encoding('UTF-8'); at the beginning of a PHP script?

Sometimes I see some PHP scripts with the following lines at the beginning:
tonix
  • 6,671
  • 13
  • 75
  • 136
2
votes
0 answers

mbstring and php 5.6.22

Script: Drupal 8.1.3, php 5.6.22 php.ini settings: .htaccess: About once a minute, I get following errors in error_log file: [23-Jun-2016 13:48:49 UTC] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be…
2
votes
0 answers

how to make CLI php use same version/modules as apache

UPDATE: Some of the information posted here may be useful to persons with similar problems, and arkascha's comment gave some insight. But I threw up my hands and just nuked and repaved my system. By being careful not to install any wrong versions…
Juan Tomas
  • 4,905
  • 3
  • 14
  • 19