Laravel:供应商/laravel/framework/src/Illuminate/Support/Arr.php中第384行的语法错误 [英] Laravel:syntax error in vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 384
问题描述
我试图在我的debian vps上运行一个新的laravel项目,但没有任何进展。我使用基本的 composer create-project laravel / laravel
初始化项目,将权限更改为 755
此处。
I tried to make a new laravel project work on my debian vps but nothing go right. I init the project with the basic composer create-project laravel/laravel
, change the permissions to 755
so everything that is explained here.
但是当我尝试访问我的< pathToMyProject> / public <时,总是出现
错误500
/ code>文件夹,当我阅读我的PHP日志时,会看到以下消息:
But I always have an error 500
when I tried to access to my <pathToMyProject>/public
folder and when I read my php's logs is see this message :
PHP解析错误:语法错误,意外的' ='在第384行的/vendor/laravel/framework/src/Illuminate/Support/Arr.php中
PHP Parse error: syntax error, unexpected '=' in /vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 384
可能是问题所在?我认为我的php版本是> 7.1
What can be the problem ? I precise that my php version is >7.1
推荐答案
同样的问题。我通过运行以下命令解决了该问题。
I faced the same problems. I resolved it by running the following commands.
php -v
php -v
它显示当前正在运行的php版本 => 7.0
It displays the current running php version => 7.0
a2dismod php7.0
a2dismod php7.0
将禁用php7.0版本。
It will be disabled php7.0 version.
a2enmod php7.2
a2enmod php7.2
将启用php7.2版本。
It will be enabled php7.2 version.
服务apache2重新启动
service apache2 restart
这篇关于Laravel:供应商/laravel/framework/src/Illuminate/Support/Arr.php中第384行的语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!