Dale_Ye
Dale_Ye

Reputation: 11

unable to use dev_appserver.py to run the local development server on mac

I was following the tutorial on Google cloud platform to run the local server for the hello-world app, and using the dev_appserver.py command, however, the terminal complain with the message as below:

$ dev_appserver.py .
INFO     2016-10-22 21:59:53,084 devappserver2.py:769] Skipping SDK update check.
INFO     2016-10-22 21:59:53,129 api_server.py:205] Starting API server at: http://localhost:56857
INFO     2016-10-22 21:59:53,133 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2016-10-22 21:59:53,137 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR    2016-10-22 21:59:54,141 php_runtime.py:348] The PHP runtime is not available
Traceback (most recent call last):
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 344, in new_instance
    self._check_binaries(php_executable_path, gae_extension_path)
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 265, in _check_binaries
    raise _PHPBinaryError('The development server must be started with the '
_PHPBinaryError: The development server must be started with the --php_executable_path flag set to the path of the php-cgi binary.

what does the complain mean? Is there anything wrong with the php_runtime.py? and how can i set it straight? Thank you so much.

Upvotes: 1

Views: 471

Answers (1)

John
John

Reputation: 11

If you're on a Mac, you need to run this command:

gcloud components install app-engine-php-darwin

If you're on Linux, you need to provide --php_executable_path as the error message states.

Upvotes: 1

Related Questions