从昨天开始,我无法将新版本的PHP 5.6。*应用程序部署到Google Cloud App Engine,默认情况下设置为PHP 7.2。*
在composer.json中,我确实需要正确的版本,这是消息
Step #0: There is no PHP runtime version specified in composer.json, or
Step #0: we don't support the version you specified. Google App Engine
Step #0: uses the latest 7.2.x version.
composer.json
{
"require": {
"php": "5.6.*",
"ext-mcrypt": "*",
"ext-imagick": "*",
"ext-mysql": "*",
"ext-zip": "*",
"ext-gd": "*",
"ext-mbstring": "*",
"ext-soap": "*",
"ext-bcmath": "*",
"ext-zip": "*",
"ext-curl": "*",
"ext-pdo_mysql": "*"
}
}
在文档中明确指出应该可用 https://cloud.google.com/appengine/docs/flexible/php/runtime?hl=en
yaml文件
runtime: php
api_version: 1
service: app-ecom-worker
env: flex
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^(.*/)?Plugin(.*/)?webroot/
- ^(.*/)?queue.yaml
- ^(.*/)?ZohoReports/UploadTool/jre/lib/rt.jar
env_variables:
PARAM1: "production"
PARAM2: "10.72.0.3"
PARAM3: ebroot
PARAM4: ""
PARAM5: ebdb
PARAM6: 10.0.0.3
PARAM7: worker
CPWATCH: 0
MTNS_RPC: "x.x.x.x:8082"
MTNS_IO: "https://app.xxxx.com:843"
REDIS_LOG: 1
REDIS_LOG_DB: 2
REDIS_LOG_HOST: 10.0.0.3
REDIS_LOG_LIMIT: 50000
beta_settings:
cloud_sql_instances: fourth-carport-210916:us-east1:ecomexperts
runtime_config:
document_root: app/webroot
resources:
cpu: 2
memory_gb: 2
automatic_scaling:
min_num_instances: 1
max_num_instances: 4
cpu_utilization:
target_utilization: 0.95
任何想法如何解决这个问题?
答案 0 :(得分:0)
您需要修复
"php": "7.2.*",
答案 1 :(得分:0)
我在App Engine Flexible中使用运行时PHP 5.6版进行了部署,并验证所部署的版本是7.2而不是5.6。此外,在部署时的步骤0中,我看到它正在用php72映像代替php56映像创建一个Dockerfile。
这似乎是一个错误,因此我创建了一个Public Issue Tracker。您可以看到所有与PHP 5.6版本问题相关的更新。