Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel "Parse error" after clean Install

After installing Laravel 5.7 on Ubuntu 16.04 64 Bit

This is the error:

Parse error: syntax error, unexpected '=' in [CENSORED]/vendor/laravel/framework/src/Illuminate/Support/Arr.php on line 388

php -v outputs

PHP 7.2.11-2+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Oct 15 2018 11:40:04) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.11-2+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999                                                                                                                                   -2018, by Zend Technologies

Already reinstalled / rebooted

Running VestaCP with Apache and Nginx

like image 721
Tom Thomson Avatar asked Apr 19 '26 10:04

Tom Thomson


1 Answers

this code run only in php 7.1 and 7.2 and this syntax show you use php 7.0 change your php version to 7.1 or 7.2 and this solve your problem

like image 140
Omid Ahmadyani Avatar answered Apr 22 '26 01:04

Omid Ahmadyani



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!