使用“gcloud预览应用程序”的PHP运行时问题在Linux上运行时 [英] PHP runtime issue with "gcloud preview app" when running on Linux

查看:123
本文介绍了使用“gcloud预览应用程序”的PHP运行时问题在Linux上运行时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用新的gcloud应用引擎命令( https://开发者。 google /cloud/sdk/gcloud-app )在一台Debian Linux机器上。

I am trying to use the new gcloud app engine commands (https://developers.google.com/cloud/sdk/gcloud-app) on a debian linux machine.

我的应用程序有一个PHP模块,当我尝试运行时:

My app has a PHP module and when I try to run:

gcloud preview app run .

我得到以下错误:

I get the following error:


错误:PHP运行时不可用Traceback(最近调用
last):File
/ home / arthur / google-cloud-sdk / platform / google_appengine / google / appengine / tools / devappserver2 / php_runtime.py,
第224行,在new_instance
self._runtime_config_getter()。application_root)文件/ home / arthur / google-cloud-sdk / platform / google_appengine / google /appengine/tools/devappserver2/php_runtime.py,
第149行,在_check_environment中
'标志(%s)不存在。'%​​php_executable_path)
_PHPBinaryError:指定的路径--php_executable_path flag()不存在。

ERROR: The PHP runtime is not available Traceback (most recent call last): File "/home/arthur/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 224, in new_instance self._runtime_config_getter().application_root) File "/home/arthur/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 149, in _check_environment 'flag (%s) does not exist.' % php_executable_path) _PHPBinaryError: The path specified with the --php_executable_path flag () does not exist.

问题是gcloud预览应用程序命令无法识别--php_executable_path标志。
因此,目前在Linux上无法使用此命令。

The problem is the gcloud preview app command does not recognize the --php_executable_path flag. So currently there is no way to use this command on Linux.

请注意,如果我直接使用dev_appserver.py,则没有问题。

Please note that if I use dev_appserver.py directly I don't have an issue.

推荐答案

PHP可执行文件不随Linux上的SDK一起发布,因此您需要自行安装它。但是,gcloud目前不允许您配置在哪里查找php运行时的位置。我们将在不久的将来发布更新gcloud,专门解决PHP兼容性问题(这当然会被覆盖)。与此同时,您可以使用dev_appserver.py来运行您的PHP模块,并使用--php_executable_path标志指向您已安装的PHP运行时。

The PHP executable is not distributed with the SDK on Linux, so you need to install it yourself. However, gcloud currently does not allow you to configure the location of where to find the php runtime. We are going to be releasing updates to gcloud in the near future specifically to address PHP compatibility (and this will certainly be covered). In the mean time, you can use dev_appserver.py to run your PHP modules and use the --php_executable_path flag to point to your installed PHP runtime.

这篇关于使用“gcloud预览应用程序”的PHP运行时问题在Linux上运行时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆