laravel 如何修复对未定义函数的调用 Symfony\Polyfill\Mbstring\iconv_strpos() 问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42361270/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 15:23:06  来源:igfitidea点击:

How to Fix Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() Issue

phplaravellaravel-5.3iconvlaravel-5.4

提问by Karthik

I uploaded my Laravel project to server. It displays following error. How to fix it?

我将我的 Laravel 项目上传到服务器。它显示以下错误。如何解决?

Fatal error: Call to undefined function Symfony\Polyfill\Mbstring\iconv_strpos() in /home/invoice/vendor/symfony/polyfill-mbstring/Mbstring.php on line 358

致命错误:在第 358 行调用 /home/invoice/vendor/symfony/polyfill-mbstring/Mbstring.php 中未定义的函数 Symfony\Polyfill\Mbstring\iconv_strpos()

回答by Manish

Did you install iconvPHP extension. If not please install and enable it. This may fix your problem. Please see the Documentation. Here is the Link.

您是否安装了iconvPHP 扩展。如果没有,请安装并启用它。这可能会解决您的问题。请参阅文档。这是链接

回答by Rohan Jalil

You need to install iconv extension.

您需要安装 iconv 扩展。

You need to make sure that php-iconvand php-mbstringare installed on the server. By default, mbstring is not installed on cPanel/WHM servers

您需要确保在服务器上安装了php-iconvphp-mbstring。默认情况下,mbstring 未安装在 cPanel/WHM 服务器上

Easiest way is composer require symfony/polyfill-iconv

最简单的方法是 composer require symfony/polyfill-iconv

回答by Gerd

You need the polyfill package. You can download the polyfill package with composer or you go on this siteand download it without composer.

你需要 polyfill 包。你可以用 composer 下载 polyfill 包,或者你去这个网站下载不带 composer 的。