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/hell
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
UPDATE: On linux use
sudo apt-get install php-cgi
dev_appserver.py --php_executable_path=/usr/bin/php-cgi app.yaml
On windows:
Download php at here https://www.php.net/downloads.php
Example the path for download D:\php72
Run app:
dev_appserver.py --php_executable_path="D:\php72\php-cgi.exe" path_app/app.yaml
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