0

I have followed these instructions:

https://cloud.google.com/appengine/docs/php/quickstart

I had to manually associate the bundled python with .py files. When I run:

dev_appserver.py --port 8087 helloworld/

I get "too few parameters" errors?

Googling has hinted at having to explicitly state the PHP binary, etc...but the docs linked above are very clear this is not required for Windows (7) as GAE comes with a bundled PHP environment.

What am I missing? What happened to the GUI launcher - that worked nicely for me :)

C:\Users\alex.DOMAIN\Desktop\temp>dev_appserver.py "temp\helloworld\" usage: dev_appserver.py [-h] [-A APP_ID] [--host HOST] [--port PORT] [--admin_host ADMIN_HOST] [--admin_port ADMIN_PORT] [--auth_domain AUTH_DOMAIN] [--storage_path PATH] [--log_level {debug,info,warning,critical,error}] [--max_module_instances MAX_MODULE_INSTANCES] [--use_mtime_file_watcher [USE_MTIME_FILE_WATCHER]] [--threadsafe_override THREADSAFE_OVERRIDE] [--php_executable_path PATH] [--php_remote_debugging [PHP_REMOTE_DEBUGGING]] [--php_gae_extension_path PATH] [--php_xdebug_extension_path PATH] [--appidentity_email_address APPIDENTITY_EMAIL_ADDRESS] [--appidentity_private_key_path APPIDENTITY_PRIVATE_KEY_ PATH] [--python_startup_script PYTHON_STARTUP_SCRIPT] [--python_startup_args PYTHON_STARTUP_ARGS] [--jvm_flag JVM_FLAG] [--custom_entrypoint CUSTOM_ENTRYPOINT] [--runtime RUNTIME] [--blobstore_path BLOBSTORE_PATH] [--mysql_host MYSQL_HOST] [--mysql_port MYSQL_PORT] [--mysql_user MYSQL_USER] [--mysql_password MYSQL_PASSWORD] [--mysql_socket MYSQL_SOCKET] [--datastore_path DATASTORE_PATH] [--clear_datastore [CLEAR_DATASTORE]] [--datastore_consistency_policy {consistent,random,time} ] [--require_indexes [REQUIRE_INDEXES]] [--auto_id_policy {sequential,scattered}] [--logs_path LOGS_PATH] [--show_mail_body [SHOW_MAIL_BODY]] [--enable_sendmail [ENABLE_SENDMAIL]] [--smtp_host SMTP_HOST] [--smtp_port SMTP_PORT] [--smtp_user SMTP_USER] [--smtp_password SMTP_PASSWORD] [--smtp_allow_tls [SMTP_ALLOW_TLS]] [--prospective_search_path PROSPECTIVE_SEARCH_PATH] [--clear_prospective_search [CLEAR_PROSPECTIVE_SEARCH]] [--search_indexes_path SEARCH_INDEXES_PATH] [--clear_search_indexes [CLEAR_SEARCH_INDEXES]] [--enable_task_running [ENABLE_TASK_RUNNING]] [--allow_skipped_files [ALLOW_SKIPPED_FILES]] [--api_port API_PORT] [--automatic_restart [AUTOMATIC_RESTART]] [--dev_appserver_log_level {debug,info,warning,critical, error}] [--skip_sdk_update_check [SKIP_SDK_UPDATE_CHECK]] [--default_gcs_bucket_name DEFAULT_GCS_BUCKET_NAME] yaml_path [yaml_path ...] dev_appserver.py: error: too few arguments

here is my app.yaml:

runtime: php55
api_version: 1

handlers:

- url: /.*
  script: helloworld.php
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
  • http://stackoverflow.com/questions/16635651/google-app-engine-php-on-windows seems to defy what Google suggests about Windows having a bundled PHP version. I have tried this and nothing worked? – Alex.Barylski Sep 21 '16 at 15:41
  • You should show the actual, complete, error message. – Daniel Roseman Sep 21 '16 at 15:48
  • That pretty much is the error - but I've added the whole command and results above – Alex.Barylski Sep 21 '16 at 18:29
  • Almost certainly your association of .py files with Python is incorrectly set up, so it is not passing on the arguments when you run the script. I don't know enough about Windows file associations to say how to fix it, although you can probably run it explicitly with "C:\path\to\python.exe dev_appserver.py temp\helloworld\". – Daniel Roseman Sep 21 '16 at 18:34
  • You are already in the `temp` directory. Why `temp/helloworld/`? – GAEfan Sep 21 '16 at 18:47

2 Answers2

0

Try: dev_appserver.py --port=8087 helloworld/

EDIT: Make sure that helloworld/ exists in your current directory, and that it contains a valid app.yaml

GAEfan
  • 11,244
  • 2
  • 17
  • 33
  • With port and without forward slashes back slashes, with and without...I have tried so many combinations and still no luck... – Alex.Barylski Sep 21 '16 at 18:42
  • You need to make sure that `helloworld` exists in your current directory, and that it contains a valid `app.yaml` – GAEfan Sep 21 '16 at 18:55
  • OK that I wasn't doing - so I backed up one directory and called: dev_appserver.py temp/ it has a valid app.yaml and helloworld.php – Alex.Barylski Sep 21 '16 at 19:04
0

This has many possible problems and solutions, and has been asked before. Check out:

GAE Python : dev_appserver.py: error: too few arguments

Starting Google App Engine Web Server

Google App Engine PHP on windows

https://github.com/wri/api-hello-world/issues/1

Community
  • 1
  • 1
GAEfan
  • 11,244
  • 2
  • 17
  • 33