Fails "php artisan up" : Call to undefined function splitStringByWidth
See original GitHub issue$ php artisan up
fails.
$ bx cf ssh $APP_NAME
> cd app
> ./php/bin/php artisan up
Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Console\mb_detect_encoding() in /home/vcap/app/vendor/symfony/console/Application.php:1121
Stack trace:
#0 /home/vcap/app/vendor/symfony/console/Application.php(780): Symfony\Component\Console\Application->splitStringByWidth('Call to undefin...', 145)
#1 /home/vcap/app/vendor/symfony/console/Application.php(750): Symfony\Component\Console\Application->doRenderException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/vcap/app/vendor/graham-campbell/exceptions/src/ExceptionHandler.php(134): Symfony\Component\Console\Application->renderException(Object(Symfony\Component\Debug\Exception\FatalThrowableError), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/vcap/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(365): GrahamCampbell\Exceptions\ExceptionHandler->renderForConsole(Object(Symfony\Component\Console\Output\ConsoleOutput), Obje in /home/vcap/app/vendor/symfony/console/Application.php on line 1121
$ vi /home/vcap/app/vendor/symfony/console/Application.php
private function splitStringByWidth($string, $width)
{
// str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
// additionally, array_slice() is not enough as some character has doubled width.
// we need a function to split string not by character count but by string width
if (false === $encoding = mb_detect_encoding($string, null, true)) {
return str_split($string, $width);
}
https://github.com/cloudfoundry/php-buildpack/issues/293 , https://github.com/cloudfoundry/php-buildpack/issues/294
Issue Analytics
- State:
- Created 4 years ago
- Comments:14
Top Results From Across the Web
php - Laravel: Call to undefined function Symfony\Component ...
php artisan migrate. I get the following error: PHP Fatal error: Call to undefined function Symfony\Component\Console\mb_convert_variables() in ...
Read more >php artisan now throwing a PHP fatal error on Laravel 5.7.26
I woke up today to an odd issue. Running php artisan by itself even will throw this: Copy Code PHP Fatal error: Uncaught...
Read more >Artisan Console - Laravel - The PHP Framework For Web ...
The handle method will be called when your command is executed. You may place your command logic in this method. Let's take a...
Read more >Call to undefined function call() : r/laravel - Reddit
I try to make a Database in Botman. When I want to do the comman "php artisan db:seed" it gives me this error....
Read more >Laravel Call to undefined function get() - iTecNote
Laravel Call to undefined function get() ... when i run a command in laravel project : ... event returned with an error [RuntimeException]...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If that still doesn’t work, put together a demo/sample where it’s failing and I’ll take a look.
Sorry, my fault. You need to run
HOME=/home/vcap/app source app/.profile.d/finalize_bp_env_vars.sh
. CF sets HOME to the app root, but when youcf ssh
home is the normal user home directory, not the app directory.