Invalid VM runtime specified: php55 Google Appengine

134 Views Asked by At

I am trying to upload php code to the google app engine but I get this failure notice during the upload:

me@big-bite: $ appcfg.py -A my-hello-world -V v1 update ./
09:36 AM Application: my-hello-world (was: myapp); version: v1 (was: None)
09:36 AM Host: appengine.google.com
09:36 AM Starting update of app: my-hello-world, version: v1
09:36 AM Getting current resource limits.
09:36 AM Scanning files on local disk.
09:36 AM Scanned 500 files.
...
09:36 AM Scanned 6000 files.
09:36 AM Scanned 6500 files.
Error 400: --- begin server output ---
**Invalid VM runtime specified: php55**
--- end server output ---

Here is my app.yaml code:

application: myapp
runtime: php55
api_version: 1
vm: true

runtime_config:
  document_root: web

Thanks, Pete.

2

There are 2 best solutions below

8
Tim On

The docs say

The flexible environment includes native support for Java 8 / Servlet 3.1 / Jetty 9, Python 2.7 and Python 3.4, Node.js, and Go.

So no php. If you want to use php you will have to

Developers can customize these runtimes or provide their own runtime, such as Ruby or PHP, by supplying a custom Docker image or Dockerfile from the open source community.

0
Justin Beckwith On

Let me clear up some confusion here :)

runtime: php55 only works on App Engine standard. This does not run your code on a VM, rather runs in the App Engine standard sandbox. It means you get a free tier, scale to 0, and App Engine APIs - but it also means no PHP 7.0 support, no composer support, and sandboxed APIs.

runtime: php only works on App Engine flexible - which is what you're using when you set vm: true. It means you get to use PHP 7.0, Docker, and Composer - but it also means no free tier, no scale to 0, and no App Engine APIs.

The guide at https://cloud.google.com/php assumes you're using App Engine Flexible. It really depends on what you're trying to build :)