1

I have tried to run my Symfony application on a remote server.

For this I chose cloud9, temporarily.

Unfortunately, for some reasons I can't get the page to work.

After loading the files and running composer install, which works fine (apart from one warning:

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

And attempting to call my /web folder I get this error:

Parse error: syntax error, unexpected '.' in /home/ubuntu/workspace/Centaur/vendor/twig/twig/lib/Twig/Extension/Core.php

Which points to this line of code

$ret = $object->$method(...$arguments);

The app worked perfectly on my local drive.

Locally I have Windows 10 with PHP 7.0.9 On cloud9 the system is linux, and I have installed PHP 7.0.20

In composer.json twig is called out like this "twig/twig": "^2.0"

Using symfony 3.2.

I have honestly ran out of ideas to save this. If anyone has any idea about how to fix this, please let me know!

Canuto-C
  • 391
  • 2
  • 7
  • 17
aln447
  • 981
  • 2
  • 15
  • 44
  • Are you sure the host is running that version of `PHP`? Did you verify with `phpinfo()`? – DarkBee Jul 04 '17 at 05:27
  • 4
    Splat operator (...) was added in PHP 5.6, so it looks like you're not really using PHP 7.0.20. You should verify that. Note that you may have a few PHP versions on your server, and webserver may use a different version than you can access via CLI with `php` command. – Jakub Matczak Jul 04 '17 at 06:09
  • Running phpinfo shows that it's using php 5.x. I will try to change it now – aln447 Jul 04 '17 at 10:02

0 Answers0