Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine PHP on windows

I'm trying to get started with using Google app engine with PHP (on Windows 7) and have been trying to follow the helloworld example here.

Problem I am having is in starting the webserver. Whenever I try to run it I get the error

dev_appserver.py: error: too few arguments

I'm typing the following at the command line:

google_appengine\dev_appserver.py --php_executable_path=c:\php\php-cgi c:\appengine\helloworld\

Any suggestions as to what I am doing wrong?

Cheers

like image 938
user2399020 Avatar asked Dec 27 '22 03:12

user2399020


2 Answers

Use quotes for arguments.

google_appengine\dev_appserver.py --php_executable_path="c:\php\php-cgi" "c:\appengine\helloworld"

Or use slashes instead of backslashes as directory separator:

google_appengine\dev_appserver.py --php_executable_path=c:/php/php-cgi c:/appengine/helloworld

For best results combine both methods ;)

like image 112
dev-null-dweller Avatar answered Jan 05 '23 19:01

dev-null-dweller


So I was running into this issue, and tried every permutation of paths using quotes, and switching to the directory where appengine SDK was installed etc. Finally I realized that Python was running the script but it wasn't including the command line arguments being passed in. So I had to manually call python like this:

c:\<python_path>\python <sdk_path>/dev_appserver.py --php_executable_path=c:/php/php-cgi.exe helloworld/

I'm not a python guy so I don't know why the command line arguments got stripped, but I've had this issue with other applications in Windows 7

like image 28
nwilde97 Avatar answered Jan 05 '23 18:01

nwilde97