0

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.

Tim
  • 41,901
  • 18
  • 127
  • 145
hep
  • 1
  • 1
  • 4
  • This code comes from a Google repository: https://github.com/GoogleCloudPlatform/getting-started-php – hep May 20 '16 at 14:17

2 Answers2

0

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.

Tim
  • 41,901
  • 18
  • 127
  • 145
  • PHP is allowed and this is the code directly from the examples: https://cloud.google.com/appengine/docs/php/quickstart#helloworldphp also there are other examples: https://cloud.google.com/appengine/docs/php/config/appref that use php55 – hep May 20 '16 at 13:59
  • Also this entire example it PHP and it works fine: https://cloud.google.com/appengine/docs/php/quickstart#download_the_hello_world_app – hep May 20 '16 at 14:07
  • This code comes from a google repo on using php: https://github.com/GoogleCloudPlatform/getting-started-php – hep May 20 '16 at 14:11
  • @hep those links also say you need a Dockerfile, do you have that configured? see https://cloud.google.com/php/getting-started/hello-world#configuring_the_app_engine_flexible_environment – Tim May 20 '16 at 14:25
  • Why did my other deployment work without one? And the other examples don't have a Dockerfile. – hep May 20 '16 at 14:42
  • @hep were the other deployments also flexible environments? E.g. `vm: true` – Tim May 20 '16 at 14:43
  • Also I believe it should be `runtime: php` without 55 – Tim May 20 '16 at 14:45
  • It still fails without the 55 as well. Thanks for the help. :) – hep May 20 '16 at 15:45
0

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 :)

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55