0
votes

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
Can you please share your app.yaml file? - Nibrass H
thanks for the reply, just added the yaml file - relgert
I was able to deploy correctly a PHP version 5.6 without a runtime:custom and without having a Dockerfile in App Engine Flexible. Before yesterday, were you able to deploy correctly? Do you see any error logs in Logging? - Nibrass H
last deployment was 01/21/2020, yesterday just updated some code, nothing extraordinary, the logs shows this Using PHP version: 7.2 Install PHP extensions... Failed to install all requested extensions: - mcrypt * is not available on your system. error building image: error building stage: waiting for process to exit: exit status 1 - relgert
In order to make this work for PHP 5.6, you have to remove the ext-mcrypt extension from the composer.json. I try to deploy with ext-mcrypt extension and got the same error, after removing it, everthing worked fine. Somehow it's causing an error. Can you please try removing it and see whether it works or not for you and share the new logs? - Nibrass H

2 Answers

0
votes
0
votes

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.