Google app engine php executable path not found

2019-01-26 17:57发布

问题:

Followed the steps given on the official google app engine page for installing the sdk for php->

https://developers.google.com/appengine/docs/php/gettingstarted/helloworld

but I get this error in my browser on opening localhost.

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

How to set it ? Installed on Ubuntu.

回答1:

When starting dev appserver via the script one can pass in --php_executable_path pointing to the location of your php executable. The reason for the error is that it was unable to find php looking in the path and such. See documentation for example.

$ google_appengine/dev_appserver.py --php_executable_path=/opt/local/bin/php-cgi54 path/to/your/app


回答2:

Install php5-cgi:

sudo apt-get install php5-cgi

Run app:

dev_appserver.py --php_executable_path=/usr/bin/php-cgi path/to/your/app


回答3:

UPDATE: On linux use sudo apt-get install php-cgi dev_appserver.py --php_executable_path=/usr/bin/php-cgi app.yaml