framework icon indicating copy to clipboard operation
framework copied to clipboard

PHP 5.6.0 mbstring.internal_encoding is deprecated

Open grvweb opened this issue 11 years ago • 19 comments

mbstring.internal_encoding is deprecated for php version 5.6.0. Please address this error: undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding() Illuminate\Foundation\Bootstrap\LoadConfiguration.php on line 43

grvweb avatar Jun 23 '15 18:06 grvweb

Why was this issue closed?

erunion avatar Aug 07 '15 00:08 erunion

Issue which was raised by me was invalid. mbstring.internal_encoding is deprecated for php version 5.6.0 but, mbstring.internal_encoding is not mb_internal_encoding() and mb_internal_encoding() was not deprecated. mbstring.internal_encoding doc http://php.net/manual/en/mbstring.configuration.php and mb_internal_encoding() doc http://php.net/manual/en/function.mb-internal-encoding.php so, I closed this issue.

grvweb avatar Aug 07 '15 05:08 grvweb

Same problem here

ilan-schemoul avatar Oct 19 '15 16:10 ilan-schemoul

What Laravel version?

GrahamCampbell avatar Oct 19 '15 17:10 GrahamCampbell

when I supress mb_internal_enconding on line 43 I can get version with artisan and it's Laravel Framework version 5.1.19 (LTS) Besides I tried to update once I supressed mb_internal_enconding I can composer update but it said - laravel/framework v5.1.19 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. thus I php --ini and it said that "php.ini Path: C:\WINDOWS" tough I set in path C:\UwAmp\bin\php\php-5.6.14

ilan-schemoul avatar Oct 19 '15 20:10 ilan-schemoul

You need to install that extension on your server.

GrahamCampbell avatar Oct 19 '15 20:10 GrahamCampbell

I use uwamp and on phpinfo() mbstring seems activated If you're talking about internal_enconding() tough I read doc I don't understand HOW install extensions?

ilan-schemoul avatar Oct 19 '15 20:10 ilan-schemoul

the requested PHP extension mbstring is missing from your system.

GrahamCampbell avatar Oct 19 '15 20:10 GrahamCampbell

You can't use Laravel without that installed.

GrahamCampbell avatar Oct 19 '15 20:10 GrahamCampbell

Is your cli version of php different to the one your using for your websever?

GrahamCampbell avatar Oct 19 '15 20:10 GrahamCampbell

I use onl Uwamp not webserver what is cli? As I said the problem could come that it don't go search php.ini in my uwamp/bin/php folder but in c:\WINDOWS but IDK how change it

ilan-schemoul avatar Oct 19 '15 21:10 ilan-schemoul

@NitroBAY The CLI is the php you use in your cmd prompt (terminal) and not necessarily the same version that uWamp uses. The mbstring extension might be enabled for your php cli but not for your uWamp.

Check that the php.ini uWamp uses has the mbstring extension enabled. My guess is it should somewhere in the folder you mention earlier uwamp/bin/php

haleksandre avatar Oct 19 '15 22:10 haleksandre

in bin/php/phpX.X.X And I've enabled mbstring in them phpini

ilan-schemoul avatar Oct 19 '15 23:10 ilan-schemoul

@NitroBAY

A simple way to troubleshoot webserver's php is to add the phpinfo() method inside the index.php.

<?php
    phpinfo();
?>

When refreshing the index.php page you should have the information you are looking for like which php.ini the uWamp webserver uses.

haleksandre avatar Oct 20 '15 00:10 haleksandre

Okay it's done C:\UwAmp\bin\apache\php.ini Weird I didn't think that php.ini was in apache that's doesn't make any sense?

ilan-schemoul avatar Oct 20 '15 00:10 ilan-schemoul

A question that there is nothing to deal with the question but IDK where ask and Google doesn't want to tell me, thus : in a web project should I start by back-end (php/mysql) or front (html/design) ? :8ball:

ilan-schemoul avatar Oct 20 '15 00:10 ilan-schemoul

Even in C:\UwAmp\bin\apache\php.ini the line mb_string don't have ; Actually in phpinfo() that I created there is Configuration File (php.ini) Path C:\WINDOWS Loaded Configuration File C:\UwAmp\bin\apache\php.ini

ilan-schemoul avatar Oct 20 '15 00:10 ilan-schemoul

Please discuss on the forums. This is not a bug.

GrahamCampbell avatar Oct 20 '15 10:10 GrahamCampbell

As this is one of the first result in Google, I thought I would post my solution here.

Simply ssh your vagrant box and run

$ sudo apt-get install php5.6-mbstring $ sudo apt-get install php5.6-curl

then $ composer update. Simply make sure mbstring and php versions are the same and it should do the trick.. it did for me!

DanDvoracek avatar Jan 09 '17 16:01 DanDvoracek