티스토리 뷰
Windows 7 64bit 기준.
google_appengine_1.8.1을 이용하여 처음 환경을 설정하고
Helloworld 예제를 따라하다보면 에러가 발생하는데...
아래 두 답변을 보고 해결할 수 있습니다. (2개의 파일 수정)
아직 PHP는 실험버전이라 에러가 많이 발생하는 듯 싶습니다.
[Tip]
많이들 빼먹고 하실 것 같은데 PHP설치시 php.ini를 꼭 설정해 줘야 한다고 합니다.
dev_appserver.py를 실행할 때에도 --php_executable_path=%PHP_PATH%/php-cgi.exe 처럼 실행파일까지
명시를 명확하게 해줘야 합니다.
제 생각에 가장 좋은 방법은 환경변수에 PYTHON_PATH, PHP_PATH, APPENGINE_PATH를 지정해 놓고
>dev_appserver.py --php_executable_path=%PHP_PATH%/php-cgi.exe helloworld
위와 같이 실행하시면 별 무리없이 실행하실 수 있을 거라 생각합니다.
그러나 처음 받아서 실행하게 되면 1.8.1. 버전 기준 아래와 같은 두가지 문제를 보시게 됩니다... 해결책이 짜잔!
http://stackoverflow.com/questions/17076200/php-gae-not-able-to-run-sdk-locally
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
INFO
2013-06-13 03:16:40,938 server.py:593] default: "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
Google seems to have messed up a little when they made the 1.8.1 revision on Windows. To fix it, go into this file:
D:\google_appengine 1.8.1\google\appengine\tools\devappserver2\php\runtime.py
You should find this at line 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.
http://stackoverflow.com/questions/17129159/php-hello-word-error-message-when-run-on-gae
Hello, World!
I believe there was a glitch in the just-released 1.8.1 SDK for PHP, and that the fix is to edit /google/appengine/tools/devappserver2/php/setup.php, adding the following to the $setup function definition:
$allowed_buckets = ini_get(
'google_app_engine.allow_include_gs_buckets');
define('GAE_INCLUDE_REQUIRE_GS_STREAMS',
// All values are considered true except the empty string.
$allowed_buckets ? 1 : 0);
(I'll confirm and update this message). I expect that a new version of the SDK will be uploaded very soon that fixes that issue.
Update: yes, this is the correct patch. The SDK for the next release, which fixes this, should be available within a few weeks.
'Study > PHP' 카테고리의 다른 글
CakePHP 사용시 Eclipse ctp Syntax Hilighting (0) | 2011.08.10 |
---|---|
PhpED를 이용하여 CakePHP 다루기 (0) | 2009.06.13 |
- Total
- Today
- Yesterday
- AIMP3
- 가상화폐
- crackit
- 암호화폐
- udacity
- MCTS
- Everybody lies
- redis
- sparse matrix
- my book live
- palindrome
- .dess
- MCITP
- Google App Engine
- 호주
- 바이올렛에버가든
- 비트코인
- 모두 거짓말을 한다
- windows 2008 server
- macdrive
- minidlna
- Windows Phone 7
- jetbrains
- 골드코스트
- 구글트렌드
- 영랩
- redis-server
- startmenu
- 시작버튼
- CTP
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |