I am totally new to GAE and I am trying to install and start using GAE PHP SDK.
I am unable to follow the instructions on the very first Hello, World! example to start the server.
Since I am new I cannot seem to figure out where I am going wrong. I got all the files paths and instructions that I have been typing.
I am using Windows XP 32 bit. I have installed Python 2.7.5 as instructed (Installing the PHP SDK on Windows). I extracted the PHP and Google Appengine in c:\documents and settings\username\
.
These are my file paths :
- PHP:
C:\documents and settings\userName\php
- google app engine:
c:\documents and settings\userName\google_appengine
- helloworld test files and yaml file "app.yaml":
c:\documents and settings\userName\helloworld
On the command line I typed as instructed (in the very first Hello, World! example)
C:\Documents and Settings\userName> "google_appengine/dev_appserver.py" --php_executable_path = "C:/Documents and Settings/userName/php" helloworld/
and I get the following error:
google.appengine.tools.devappserver2.errors.InvalidAppConfigError: "C:/Documents and Settings/userName/php" is a directory and a yaml configuration file is required
Traceback is (including error at the end):
File "C:\Documents and Settings\userName\google_appengine\dev_appserver.py", line 182, in run_file(file, globals())
File "C:\Documents and Settings\userName\google_appengine\dev_appserver.py", line 178, in _run_file execfile(script_path, globals)
File "C:\Documents and Settings\userName\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 695, in main() File "C:\Documents and Settings\userName\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 688, in main dev_server.start(options)
File "C:\Documents and Settings\userName\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 525, in start options.yaml_files)
File "C:\Documents and Settings\userName\google_appengine\google\appengine\tools\devappserver2\application_configuration.py", line 541, in init yaml_path)
google.appengine.tools.devappserver2.errors.InvalidAppConfigError: "C:/Documents and Settings/userName/php" is a directory and a yaml configuration file is required
The parameter
--php_executable_path
should be the path to the php-cgi binary, not the folder it resides in.Please do as you have been instructed in the section Testing the Application:
It seems that you are looking to understand what
<path to php-cgi>
in this case means. You obviously tried this with a directory, however, this is the path to the PHP binary, that is the executable file.On Windows this is often called program. So you need to put the path to the php-cgi program there, not to the path to the php-cgi directory.
For your further understanding of the error message and how to fix it:
You are probably also looking for understanding where you can retrieve the error message from:
It is on the end of the Stacktrace in Python:
If you read that carefully you can see the following text verbatim:
So you have passed a directory instead of
helloworld/
that does not contain the yaml file. Namely"C:/Documents and Settings/userName/php"
.You obviously meant to use that directory for the PHP executeable path - which as already outlined - was slightly wrong, the binary is needed instead. However it's obviously not even set for that because you didn't understand that you can not just introduce spaces where you think you can at free will on the commandline.
To make the error go away you need to really follow the instructions, they have been written down for a reason. So: