cookie
cookie

Reputation: 2728

Parse error: syntax error, unexpected T_STRING in /var/sites/s/example.co.uk/artisan on line 46

I'm trying to create a (Laravel) migration on the shell of my production shared hosting server. In the shell, I run the following:

/usr/bin/php artisan migrate:make mydatabase

and receive the following error:

Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /var/sites/s/example.co.uk/artisan on line 46

Parse error: syntax error, unexpected T_STRING in /var/sites/s/example.co.uk/artisan on line 46

The error references line 46

$artisan = Illuminate\Console\Application::start($app);

it doesn't seem to like the backslashes, but this is part of the original config? I don't understand.

Furthermore, no matter what I try to do with artisan

/usr/bin/php artisan --version

Warning: Unexpected character in input:  '\' (ASCII=92) state=1 in /var/sites/s/example.co.uk/artisan on line 46

Parse error: syntax error, unexpected T_STRING in /var/sites/s/example.co.uk/artisan on line 46

What am I missing?

Upvotes: 0

Views: 3860

Answers (1)

Razor
Razor

Reputation: 9835

Check your php version php -v, if it's less than 5.3 you should update it because namespaces were introduced in PHP 5.3

Upvotes: 1

Related Questions