我正在尝试启动GAE php本地服务器并且我得到“[错误5]权限被拒绝”错误(Acceso denegado)。我在两台不同的PC上试过这个 Windows 7(一个是家庭版,另一个是企业版),总是同样的问题。
在这两种情况下,我都是具有管理员权限的用户,并且我遵循了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
任何帮助都是值得的,谢谢。
答案 0 :(得分:2)
在 Windows 上,您必须在可执行文件名中说 ABSOLUTE PATH to 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”路径上运行此命令。