Since yesterday I can’t deploy new versions of my PHP 5.6.* app to Google Cloud App Engine, by default is setting PHP 7.2.*
In the composer.json I do require the the correct version, this is the message
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": "*"
}
}
In the documentation clearly says it should be available
https://cloud.google.com/appengine/docs/flexible/php/runtime?hl=en
yaml file
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
Any Idea how to solve this?
2
Answers
You need to fix
"php": "7.2.*",
I deployed with Runtime PHP version 5.6 in App Engine Flexible and verified that the deployed version is 7.2 instead of 5.6. Alsos in the Step 0 when deploying, I saw that it was creating a Dockerfile with php72 image in place of php56 image.
It seems a bug so I created a Public Issue Tracker. You can see all the updates their related to PHP 5.6 version issue.