user3718908x100
user3718908x100

Reputation: 8519

Laravel Syntax Error

i just uploaded my website to a server and i'm currently trying to configure it, have had a lot of issues especially with changing the paths, right now my main issue is this:

PHP Parse error:  syntax error, unexpected '[' in /hermes/bosoraweb097/b1299/dom.epchurchadentaorg/xxxxxxxxxxxxx.com/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 49

So i went to that file to check:

if ( ! function_exists('app'))
{
    /**
     * Get the available container instance.
     *
     * @param  string  $make
     * @param  array   $parameters
     * @return mixed|\Illuminate\Foundation\Application
     */
    function app($make = null, $parameters = []) // Line 49 error
    {
        if (is_null($make)) return Container::getInstance();

        return Container::getInstance()->make($make, $parameters);
    }
}

Now personally i can't see anything wrong with it and it works just fine on my localhost, could there be another issue?

Upvotes: 1

Views: 2099

Answers (1)

Chilion
Chilion

Reputation: 4500

The problem here is that your PHP version is not up to date with the Laravel 5 requirements. For Laravel 5 you need:

The Laravel framework has a few system requirements:

PHP >= 5.4 
Mcrypt PHP Extension 
OpenSSL PHP Extension 
Mbstring PHP
Extension Tokenizer PHP Extension

I think your server has 5.3

Upvotes: 2

Related Questions