我使用波纹管命令将 php 应用程序部署到应用程序引擎:
gcloud app deploy --promote --project test12 app-live.yaml --log-http --verbosity=debug
我的 app-live.yaml 文件:
runtime: php72
api_version: 1
env_variables:
VERSION: '2.0'
APP_MODE: live
GOOGLE_CLOUD_PROJECT: xx
CLOUD_STORAGE_BUCKET: xx.appspot.com
GOOGLE_APPLICATION_CREDENTIALS: data/file.json
handlers:
# Serve images as static resources.
- url: /(.+\.(gif|png|jpg|jpeg|js|css|ttf|woff2|otf|eot|svg|ttf|woff|ico|map))$
static_files: \1
upload: .+\.(gif|png|jpg|jpeg|js|css|ttf|woff2|otf|eot|svg|ttf|woff|ico|map)$
application_readable: true
http_headers:
X-file-Header: static
Access-Control-Allow-Origin: "*"
- url: /cron/(.*)
script: cron/\1
- url: /.*
script: index.php
secure: always
error_handlers:
- error_code: over_quota
file: layout/html/over_quota.html
但显示此错误:
HttpBadRequestError:访问https://appengine.googleapis.com/v1/apps/ads-clickgs/services/default/versions?alt=json的 HttpError:响应:<{'状态':'400','内容长度':'252','x-xss-protection':'1; mode=block','x-content-type-options':'nosniff','transfer-encoding':'chunked','vary':'Origin,X-Origin,Referer','server':'ESF' , '-content-encoding': 'gzip', 'cache-control': 'private', 'date': 'Tue, 28 Aug 2018 04:44:34 GMT', 'x-frame-options': 'SAMEORIGIN ', 'alt-svc': 'quic=":443"; 马=2592000;v="44,43,39,35"', '内容类型': '应用程序/json; charset=UTF-8'}>, content <{ "error": { "code": 400, "message": "请更新到最新版本的 gcloud。如果您直接使用 API,请为 version.entrypoint.shell 提供一个值。这可以是一个空值。", "status": "INVALID_ARGUMENT" }
我在谷歌上搜索过,但没有找到任何建议。