I'm receiving this error when trying to deploy locally using Google App Engines's sdk (PHP 7)
dev_appserver.py app.yaml
Returns
WARNING: The Cloud SDK no longer ships runtimes for PHP 5.4. Please set your runtime to be "php55".
This is my .yaml file
runtime: php
env: flex
runtime_config:
document_root: public
# Ensure we skip ".env", which is only for local development
skip_files:
- .env
env_variables:
# Put production environment variables here.
APP_LOG: errorlog
APP_KEY: :XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
STORAGE_DIR: /tmp
It works fine using PHP 5+
runtime: php55
api_version: 1
My sdk components are up to date.
I'm not finding anyone having this issue. Wondering if I should just re-install the sdk.
The php
option is probably still around for backward compatibility since 5.4 used to be supported. Use php55
.
From the August 14, 2015 - Version 1.9.25 Release notes:
- Development server no longer supports the "php" runtime. This will result in a Runtime Error. Please use "php55" instead.
And from the app.yaml
Syntax table:
runtime
Required. The name of the App Engine runtime environment used by this application. To specify PHP, use php55.
runtime: php55
Update:
The above applies to the standard environment only, but since this is a flexible environment config @btaylor507's answer is better.
dev_appserver.py does not run in the App Engine flexible environment.
From the standard environment Running the local development server:
Note: dev_appserver.py does not run in the App Engine flexible environment.
From the flex environment Running locally:
You run your application locally with the native development tools that you usually use.