0
votes

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

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

gcloud preview app run .

I get the following error:

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.

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.

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

2

2 Answers

1
votes

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.

0
votes
  1. The php-cgi executable should exist in the google-cloud-sdk/bin/bootstrapping/ directory, where google-cloud-sdk is your installation directory, is that file there?

  2. Make sure you have PHP component of the Cloud SDK installed, if you do gcloud components list, is App Engine SDK for Python and PHP listed as installed, under Individual Components?