简体   繁体   English

PHP GAE无法在本地运行SDK

[英]PHP GAE not able to run SDK locally

I installed the latest SDK for php 1.8.1 and I am having trouble getting it to run locally 我为php 1.8.1安装了最新的SDK,我无法让它在本地运行

D:\\google_appengine 1.8.1>dev_appserver.py --php_executable_path=D:\\PHP\\php-cgi.exe \\Testing --port=5000 D:\\ google_appengine 1.8.1> dev_appserver.py --php_executable_path = D:\\ PHP \\ php-cgi.exe \\ Testing --port = 5000

INFO     2013-06-13 03:16:30,931 sdk_update_checker.py:244] Checking for updates to the SDK.

INFO     2013-06-13 03:16:32,851 sdk_update_checker.py:260] Update check failed: HTTP Error 404: Not Found

**WARNING  2013-06-13 03:16:32,861 api_server.py:314] Could not initialize images API; you are likely missing the Python "PIL" module.**

INFO     2013-06-13 03:16:32,868 api_server.py:138] Starting API server at: http://localhost:60628

INFO     2013-06-13 03:16:32,874 dispatcher.py:164] Starting server "default" running at: http://localhost:5000

INFO     2013-06-13 03:16:32,878 admin_server.py:117] Starting admin server at: http://localhost:8000

ERROR:root:php failure (255) with:
X-Powered-By: PHP/5.4.16
Content-type: text/html

Warning : require_once(google/appengine/runtime/ApiProxy.php): failed to open stream: No such file or directory in D:\\google_appengine 1.8.1\\google\\appengine \\tools\\devappserver2\\php\\setup.php on line 21 警告 :require_once(google / appengine / runtime / ApiProxy.php):无法打开流:第21行的D:\\ google_appengine 1.8.1 \\ google \\ appengine \\ tools \\ devappserver2 \\ php \\ setup.php中没有此类文件或目录
INFO 信息
2013-06-13 03:16:40,938 server.py:593] default: "GET / HTTP/1.1" 500 - 2013-06-13 03:16:40,938 server.py:593]默认值:“GET / HTTP / 1.1”500 -
Fatal error : require_once(): Failed opening required 'google/appengine/runtime/ApiProxy.php' (include_path='D:\\Testing') in D:\\google_appengine 1.8.1\\google \\appengine\\tools\\devappserver2\\php\\setup.php on line 21 致命错误 :require_once():在D:\\ google_appengine 1.8.1 \\ google \\ appengine \\ tools \\ devappserver2 \\ php \\中打开所需的'google / appengine / runtime / ApiProxy.php'(include_path ='D:\\ Testing') 失败21行的setup.php

I am trying to find what the problem is but have no idea what is wrong. 我试图找出问题所在,但不知道出了什么问题。 What is the PIL module I am missing? 我错过了什么是PIL模块? The error says that ApiProxy.php is missing but it is located at 该错误表示ApiProxy.php丢失,但它位于

D:\\google_appengine 1.8.1\\php\\sdk\\google\\appengine\\runtime D:\\ google_appengine 1.8.1 \\ php \\ sdk \\ google \\ appengine \\ runtime

Some one posted a similar issue and said they fixed it by doing the following 有人发布了一个类似的问题并说他们通过以下方式解决了这个问题

The problem is I also have a python version Google-App-engine. 问题是我还有一个python版Google-App-engine。 In order to solve this this problem, I need to specify the "dev_appserver" to PHP-GAE-SDK 为了解决这个问题,我需要为PHP-GAE-SDK指定“dev_appserver”

I have no idea what that and will it fix the errors shown. 我不知道那是什么,它会修复显示的错误。 Any thoughts? 有什么想法吗?

Google seems to have messed up a little when they made the 1.8.1 revision on Windows. 当谷歌在Windows上进行1.8.1修订时,谷歌似乎已经搞砸了一些。 To fix it, go into this file: 要修复它,请进入以下文件:

D:\\google_appengine 1.8.1\\google\\appengine\\tools\\devappserver2\\php\\runtime.py D:\\ google_appengine 1.8.1 \\ google \\ appengine \\ tools \\ devappserver2 \\ php \\ runtime.py

You should find this at line 112: 你应该在第112行找到这个:

  if sys.platform == 'win32':
    include_path = 'include_path=%s' % ';'.join(include_paths)

Change that to: 改为:

  if sys.platform == 'win32':
    include_path = 'include_path="%s"' % ';'.join(include_paths)

Note the extra pair of quotes around the %s. 注意%s周围的额外引号对。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM