【问题标题】:Google App Engine PHP running on mac在 Mac 上运行的 Google App Engine PHP
【发布时间】:2013-05-21 22:44:26
【问题描述】:

尝试在 Google App Engine 上运行 WordPress。

安装后我错过了“php-cgi 的路径”在哪里?

我可以在 macport/software/php54-cgi 下找到一些 php54-cgi,但是将路径设置为这个会导致权限错误。

安装也错过了关于安装 python sdk 以运行 dev_appserver.py 的任何内容。

问题是你甚至可以在 mac 上运行 hello world 吗?如果可以,如何启动 dev_appserver.py?

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

Error message:

 dev_appserver.py --php_executable_path=/opt/local/var/macports/software/php54-cgi /Users/name/GAE/PHPTest 
WARNING  2013-05-21 22:31:10,600 api_server.py:329] Could not initialize images API; you are likely missing the Python "PIL" module.
WARNING  2013-05-21 22:31:10,606 simple_search_stub.py:962] Could not read search indexes from /var/folders/6w/2nmsznqj3d7310_lp70p34s00000gn/T/appengine.helloworld/search_indexes
INFO     2013-05-21 22:31:10,609 api_server.py:153] Starting API server at: http://localhost:49390
INFO     2013-05-21 22:31:10,614 dispatcher.py:164] Starting server "default" running at: http://localhost:8080
INFO     2013-05-21 22:31:10,619 admin_server.py:117] Starting admin server at: http://localhost:8000
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/server.py", line 1232, in _loop_adjusting_instances
    self._adjust_instances()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/server.py", line 1209, in _adjust_instances
    self._add_instance(permit_warmup=True)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/server.py", line 1087, in _add_instance
    expect_ready_request=perform_warmup)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 195, in new_instance
    self._check_environment(php_executable_path)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 138, in _check_environment
    env={})
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/safe_subprocess.py", line 61, in start_process
    stdin=subprocess.PIPE)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

谢谢 问候

【问题讨论】:

  • 我得到了完全相同的错误,但在 Arch Linux 上。我的 php-cgi 在路径上。事实上,如果我运行php-cgi helloworld.php,它就可以完美运行。关于问题是什么或如何获得更多信息的任何想法?
  • 事实上我认为我没有指定我的 php-cgi 的整个路径。

标签: google-app-engine


【解决方案1】:

我使用 macports 让它运行,/opt/local/bin/php-cgi54。

./google_appengine/dev_appserver.py --php_executable_path=/opt/local/bin/php-cgi54 --php_remote_debugging=yes ~/apps/minishell/

但是,我不确定您的权限被拒绝错误是否与无法找到 php-cgi 可执行文件有关。

【讨论】:

  • 这行得通,现在我遇到了一些其他错误(无法打开流:)。 Windows Azure WordPress 没有问题。
  • 我不知道这是什么意思
  • 嗨,克里斯,您能描述一下您在新问题中遇到的其他错误吗?
  • 您好 Andrew,感谢您的提问 - 但我继续使用 Windows Azure,这要容易得多。
猜你喜欢
  • 1970-01-01
  • 2012-06-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-03-31
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多