简体   繁体   English

Google App Engine:警告:Cloud SDK不再附带PHP 5.4的运行时

[英]Google App Engine: WARNING: The Cloud SDK no longer ships runtimes for PHP 5.4

I'm receiving this error when trying to deploy locally using Google App Engines's sdk (PHP 7) 尝试使用Google App Engine的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 这是我的.yaml文件

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+ 使用PHP 5+可以正常工作

runtime: php55
api_version: 1

My sdk components are up to date. 我的SDK组件是最新的。

I'm not finding anyone having this issue. 我找不到有人遇到这个问题。 Wondering if I should just re-install the sdk. 想知道我是否应该重新安装SDK。

dev_appserver.py does not run in the App Engine flexible environment. dev_appserver.py无法在App Engine灵活环境中运行。

From the standard environment Running the local development server : 在标准环境中运行本地开发服务器

Note: dev_appserver.py does not run in the App Engine flexible environment. 注意:dev_appserver.py无法在App Engine灵活环境中运行。

From the flex environment Running locally : 在flex环境中在本地运行

You run your application locally with the native development tools that you usually use. 您可以使用通常使用的本机开发工具在本地运行应用程序。

The php option is probably still around for backward compatibility since 5.4 used to be supported. 由于以前一直支持5.4,因此php选项可能仍然存在以实现向后兼容性。 Use php55 . 使用php55

From the August 14, 2015 - Version 1.9.25 Release notes: 2015年8月14日开始-版本1.9.25发行说明:

  • Development server no longer supports the "php" runtime. 开发服务器不再支持“ php”运行时。 This will result in a Runtime Error. 这将导致运行时错误。 Please use "php55" instead. 请改用“ php55”。

And from the app.yaml Syntax table: app.yaml 语法表中:

runtime 运行

Required. 需要。 The name of the App Engine runtime environment used by this application. 此应用程序使用的App Engine运行时环境的名称。 To specify PHP, use php55. 要指定PHP,请使用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. 以上内容仅适用于标准环境,但是由于这是一种灵活的环境,因此配置@ btaylor507的答案会更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine PHP SDK-Google云存储-访问上载文件的内容 - Google App Engine PHP SDK - Google Cloud Storage - accessing contents of uploaded file Google App Engine启动RuntimeError:未知的运行时'php'; 支持的运行时为“自定义” - Google App Engine launch RuntimeError: Unknown runtime 'php'; supported runtimes are 'custom' 如何在Google Compute Engine中使用适用于PHP的Google App Engine SDK - How to use Google App Engine SDK for php in Google Compute Engine 在 Google Cloud App Engine 中使用 php 扩展 - Use php extensions in Google Cloud App Engine Google App Engine PHP和Cloud SQL - Google App Engine PHP and Cloud SQL 将PHP getimagesize和imagecreate与Google App Engine和Google Cloud Storage结合使用 - Using PHP getimagesize and imagecreate with Google App Engine and Google Cloud Storage Google App Engine和PHP测试上传到Google Cloud Storage - Google App Engine and PHP Testing Upload to Google Cloud Storage 如何使用谷歌应用引擎将 php 项目部署到谷歌云中? - How to deploy php project into google cloud using google app engine? Google APP Engine PHP 应用程序上的警告 mkdir() 权限被拒绝 - Warning mkdir() Permission Denied on Google APP Engine PHP Application 我可以使用适用于PHP SDK的Google应用程序引擎调用“ mkdir”功能吗? - Could I call “mkdir” function with Google app engine for PHP SDK?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM