解析错误:语法错误,意外'?'在第233行的/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php中 - laravel

问题描述 投票:2回答:1

我有一个在php 7上运行的子域文件夹。在全球范围内,我的php版本实际上是5.6。当我运行我的项目时,我得到500内部错误。检查我的error_log,我看到了这个错误

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

我试图在我的子文件夹中安装此命令composer require symfony/polyfill-icon(在php 7上运行的子域下)但是这是终端中的结果

Warning: Ambiguous class resolution, "App\Http\Controllers\Auth\RegisterController" was found in both "/home/laravel/public_html/myproject/app/Http/Controllers/mNotify/Auth/RegisterController.php" and "/home/laravel/public_html/myproject/app/Http/Controllers/Auth/RegisterController.php", the first will be used.
> Illuminate\Foundation\ComposerScripts::postAutoloadDump

Parse error: syntax error, unexpected '?' in /home/laravel/public_html/myproject/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 233

当我在子域下的子文件夹中查看vendor file时,Symfony\Polyfill\Mbstring\iconv安装在那里,但是当我使用php --ir iconv从终端进行测试时,它会得到Extension iconv is not present

怎么了?

php laravel symfony
1个回答
1
投票

检查mod php <7.0是否已启用禁用它。并启用mod php 7或7.1

© www.soinside.com 2019 - 2024. All rights reserved.