PhpPathError: For php72, --php_executable_path must be specified in Google App Engine project

PhpPathError: For php72, --php_executable_path must be specified in Google App Engine project

我在我的本地环境 (windows 10) 中 运行ning google 云 sdk,并将应用程序部署到云项目。我可以 运行 php55 项目,但是当我尝试 运行 php72 项目时,出现以下错误。

INFO     2019-10-12 09:22:00,588 devappserver2.py:278] Skipping SDK update check.
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 96, in <module>
    _run_file(__file__, globals())

  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\dev_appserver.py", line 90, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)

  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 600, in <module>
    main()

  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 588, in main   dev_server.start(options)

  File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 301, in start
    raise PhpPathError('For php72, --php_executable_path must be specified.')
__main__.PhpPathError: For php72, --php_executable_path must be specified.

在app.yaml中:

runtime: php72

您似乎在本地使用 dev_appserver.py 来 运行 您的项目,但根据 Google App Engine documentation here,您不能使用 dev_appserver.py PHP7.

具体说:

dev_appserver.py is not supported with the PHP 7.2 and PHP 7.3 runtimes. To test your application and run it locally, you must download and install PHP 7.2 or PHP 7.3 and set up a web server.

For example, start the HTTP server by running the following command:

php -S localhost:8080

Then, view your application in your web browser at http://localhost:8080.