Wryth's avatar
Level 1

unexpected '=' Illuminate/Support/Arr.php on line 388

Hello,

I'm currently trying to setup a laravel project to learn how to use laravel. I just installed composer, and typed :

composer create-project --prefer-dist laravel/laravel test

I created then a symbolic link of the public folder in the fresh new laravel project called test to one directory on my apache server.

But when i'm opening the browser I'm getting an error :

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

How could I handle to solve this problem ?

0 likes
14 replies
Wryth's avatar
Level 1

php 7.2

(php -v) PHP 7.2.10-1+0~20181001133118.7+stretch~1.gbpb6e829 (cli) (built: Oct 1 2018 13:31:18) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.10-1+0~20181001133118.7+stretch~1.gbpb6e829, Copyright (c) 1999-2018, by Zend Technologies

Cronix's avatar

Since he used composer to install, composer wouldn't have installed it if the php version wasn't adequate. My bet is however he did this

I created then a symbolic link of the public folder in the fresh new laravel project called test to one directory on my apache server.

2 likes
Wryth's avatar
Wryth
OP
Best Answer
Level 1

I just figured out the problem thanks to your answer

I had php7.2 installed but apache was still using php7.0

a2dismod php7.0 a2enmod php7.2 service apache2 restart

Thanks :)

10 likes
D9705996's avatar

It is possible that the CLI version of PHP is 7.2 but apache is using an older version of PHP. Would be worth adding a phpinfo.php in the root of your public folder containing

<?php 

phpinfo();

the navigate to your http://www.yoursite.com/phpinfo.php and double check the version.

Ensure you remove the phpinfo.php file once you have tested.

2 likes
Abdifatah's avatar

I had the same problem ,I started uploading my Laravel 5.7 project on Bluehost shared hosting updated server to php 7.2 ,And I still get this error.

SandeepYadav's avatar

I upgraded my PHP version from 7.0 to 7.2 and thats worked for me.

jubale1328's avatar

I'm just running into this issue...I checked that PHP7.4 is installed for FPM and for Apache. I'm very confused as to how to solve this.

nyjisymev's avatar

Laravel project is used to installed and typing or create projects or giving laravel tests to their users.I faced an error to installed laravel software's best dissertation service to gives us write answers after discussing our problems.

yangtulo's avatar

Newly added snake skins are more diverse so that players can choose and change the appearance of their snakes to become more unique. has also fixed some minor bugs and optimized them for a smoother and more engaging player experience.

Please or to participate in this conversation.