2

我正在尝试启动 GAE php 本地服务器,但出现“[错误 5] 权限被拒绝”错误(Acceso denegado)。我在两台装有 Windows 7 的不同 PC 上都试过这个(一个是家庭版,另一个是企业版),但总是同样的问题。

在这两种情况下,我都是具有管理员权限的用户,并且我已按照 helloworld 示例中的说明进行操作,但没有运气。我关闭了 IIS 服务器以避免与标准端口冲突。

这是我的启动服务器命令行:

C:/Users/alalarcon/google_appengine/dev_appserver.py --php_executable_path="C:/Users/alalarcon/php-5.4.15" "C:/Users/alalarcon/helloworld/"

这就是控制台的结果:

C:\Users\alalarcon\google_appengine>dev_appserver.py --php_executable_path="C:/Users/alalarcon/php-5.4.15" "C:/Users/alalarcon/helloworld/"
WARNING  2013-05-30 10:03:02,525 api_server.py:329] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO     2013-05-30 10:03:02,539 api_server.py:153] Starting API server at: http://localhost:63819
INFO     2013-05-30 10:03:02,545 dispatcher.py:164] Starting server "default" running at: http://localhost:8080
Exception in thread Thread-5:
Traceback (most recent call last):
  File "C:\Users\alalarcon\Python27\lib\threading.py", line 810, in __bootstrap_inner
    self.run()
  File "C:\Users\alalarcon\Python27\lib\threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\server.py", line 1232, in _loop_adjusting_instances
    self._adjust_instances()
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\server.py", line 1209, in _adjust_instances
    self._add_instance(permit_warmup=True)
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\server.py", line 1087, in _add_instance
    expect_ready_request=perform_warmup)
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\php_runtime.py", line 195, in new_instance
    self._check_environment(php_executable_path)
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\php_runtime.py", line 138, in _check_environment
    env={})
  File "C:\Users\alalarcon\google_appengine\google\appengine\tools\devappserver2\safe_subprocess.py", line 61, in start_process
    stdin=subprocess.PIPE)
  File "C:\Users\alalarcon\Python27\lib\subprocess.py", line 711, in __init__
    errread, errwrite)
  File "C:\Users\alalarcon\Python27\lib\subprocess.py", line 948, in _execute_child
    startupinfo)
WindowsError: [Error 5] Acceso denegado

INFO     2013-05-30 10:03:02,551 admin_server.py:117] Starting admin server at: http://localhost:8000

任何帮助都非常感谢,谢谢。

4

1 回答 1

2

Windows上,您必须在可执行文件名中说出PHP 的绝对路径!像这样:

python dev_appserver.py --skip_sdk_update_check=yes --port=8080 --admin_port=8000 --php_executable_path=C:\xampp\php\php-cgi.exe C:\www\projects\your_project_name

ps:在“google_appengine”路径上运行此命令。

于 2013-08-15T23:39:24.520 回答