升级到Laravel 5.6之后我有错误'PHP Parse错误:语法错误,意外'?''

时间:2018-04-18 13:39:34

标签: ubuntu-16.04 php-7.2

从Laravel 5.5升级到Laravel 5.6后出现错误。

PHP Parse error:  syntax error, unexpected '?' in .../vendor/symfony/http-foundation/Response.php on line 499

我在服务器上检查php vershion:

  

#php -v   PHP 7.2.4-1 + ubuntu16.04.1 + deb.sury.org + 1(cli)(内置:2018年4月5日08:53:57)(NTS)
  版权所有(c)1997-2018 PHP集团
  Zend Engine v3.2.0,版权所有(c)1998-2018 Zend Technologies
      与Zend OPcache v7.2.4-1 + ubuntu16.04.1 + deb.sury.org + 1,版权所有(c)1999-2018,作者:Zend Technologies

重新安装php并重新启动apache。

我有同样的本地项目,有相同的php及其工作!

1 个答案:

答案 0 :(得分:8)

删除PHP 7.0。

module "grafana-stg" {
  source = "../../modules/services/gen-ec2"
  #ami_id = "${data.aws_ami.ubuntu.id}"
  instance_type = "${var.grafana_machine_type}"
  key_name = "jumpbox"
  vpc_security_group_ids = ["${aws_security_group.grafana-sec-group.id}"]

  #subnets = "${data.terraform_remote_state.s3_bucket_state.subnet-public-prod-1a}"

  subnet_id = ??????????????????

  disable_api_termination = "${var.is_production ? true : false}"


}

它对我有用。