Path specified --php_executable_path does not exis

2019-06-10 01:51发布

Setup the GAE PHP sandbox on my Linux laptop (running Debian 'Wheezy' 32-bit, latest packages). Setup was done following the 'Installing the SDK' instructions, followed by an attempt at the 'Getting-Started > Hello World' application, following the instructions.

However, when I visit http://local.host.com:8080*, I get the following message, instead of 'Hello World!':

The path specified with the --php_executable_path flag () does not exist.

*Note: SO doesn't allow URL pointing to localhost, so replaced it with local.host.com! It is not a mistake.

On the console where I'd started the app_server, I see the following error-message:

ERROR    2014-04-29 03:34:36,219 php_runtime.py:223] The PHP runtime is not available
Traceback (most recent call last):
  File "/home/icarus/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 219, in new_instance
    self._check_environment(php_executable_path)
  File "/home/icarus/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 148, in _check_environment
    'flag (%s) does not exist.' % php_executable_path)
_PHPBinaryError: The path specified with the --php_executable_path flag () does not exist.

Note that I've installed the latest php-5.4.27 (instructions talk of php-5.4.25, but later go on to say in a NOTE that we can get the latest from PHP website), and built it on my machine, successfully as per instructions.

Is the php-5.4.25 hardcoded anywhere, s.t. it is not found, as on my machine I've got php-5.4.27 ? Here is what I see:

$ ls -l ~/php-5.4.27/installdir/bin/php-cgi
-rwxr-xr-x 1 icarus icarus 23195302 Apr 28 22:58 php-cgi

Python installed is 2.7.3, and the google_appengine SDK is latest stable i.e. 1.9.3.

1条回答
戒情不戒烟
2楼-- · 2019-06-10 02:27

Argh... I ignored to see the plethora of questions already on SO, on this (or nearly this) subject, most perhaps from newbies like me.

Based on this other SO question's answer, I started the SDK like this:

$ google_appengine/dev_appserver.py --php_executable_path=php-5.4.27/installdir/bin/php-cgi work/gae_apps/helloworld/

and finally 'Hello World!' worked as expected. Perhaps, this calls for bit of clarification / elaboration on the 'Getting Started' page ?

查看更多
登录 后发表回答