1 php google-app-engine google-compute-engine centos6
我试图在gce debian和/或gce centos实例上运行gae php hellowrold. https://developers.google.com/appengine/docs/php/gettingstarted/helloworld
在gce debian和gce centos系统上运行时,helloworld示例生成PHP的白屏死机.每个实例都是在过去48小时内创建的新构建.
我的最新版本是centos所以我将描述这个环境.
蟒蛇:
[stephen@skc-php-dev-centos-00 ~]$ which python
/usr/local/bin/python
[stephen@skc-php-dev-centos-00 ~]$ python -V
Python 2.7.6
[stephen@skc-php-dev-centos-00 ~]$
Run Code Online (Sandbox Code Playgroud)
PHP:
[stephen@skc-php-dev-centos-00 bin]$ ./php -v
PHP 5.4.15 (cli) (built: Dec 10 2013 20:31:32)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
[stephen@skc-php-dev-centos-00 bin]$
Run Code Online (Sandbox Code Playgroud)
google_appengine:
[stephen@skc-php-dev-centos-00 google_appengine]$ cat VERSION
release: "1.8.8"
timestamp: 1383722570
api_versions: ['1']
supported_api_versions:
python:
api_versions: ['1']
python27:
api_versions: ['1']
go:
api_versions: ['go1']
[stephen@skc-php-dev-centos-00 google_appengine]$
Run Code Online (Sandbox Code Playgroud)
启动helloworld的命令:
/home/stephen/skc-local/google/google_appengine/dev_appserver.py --php_executable_path=/home/stephen/skc-local/bin/php /home/stephen/code/google-php/helloworld
Run Code Online (Sandbox Code Playgroud)
服务器启动正常:
WARNING 2013-12-11 10:58:47,524 api_server.py:331] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-12-11 10:58:47,538 api_server.py:138] Starting API server at: http://localhost:40256
INFO 2013-12-11 10:58:47,556 dispatcher.py:171] Starting module "default" running at: http://localhost:8080
INFO 2013-12-11 10:58:47,557 admin_server.py:117] Starting admin server at: http://localhost:8000
INFO 2013-12-11 10:59:33,646 module.py:617] default: "GET / HTTP/1.1" 200 -
INFO 2013-12-11 10:59:33,702 module.py:617] default: "GET /favicon.ico HTTP/1.1" 200 -
Run Code Online (Sandbox Code Playgroud)
当我点击服务器时,我得到200响应,但是当我访问服务器时
http://localhost:8080/
Run Code Online (Sandbox Code Playgroud)
我唯一看到的是可怕的PHP白屏死机.
似乎开发服务器没有任何错误记录.
我的代码:helloworld.php
<?php
echo 'Hello, World!';
Run Code Online (Sandbox Code Playgroud)
的app.yaml
application: helloworld
version: 1
runtime: php
api_version: 1
handlers:
- url: /.*
script: helloworld.php
Run Code Online (Sandbox Code Playgroud)
我非常密切地遵循了指示; 在这一点上,我最了解他们.
任何见解或建议将不胜感激.
小智 5
/home/stephen/skc-local/google/google_appengine/dev_appserver.py --php_executable_path =/home/stephen/skc-local/bin/php/home/stephen/code/google-php/helloworld
尝试将可执行文件更改php为php-cgi..以便它看起来像这样:
/home/stephen/skc-local/google/google_appengine/dev_appserver.py --php_executable_path =/home/stephen/skc-local/bin/php-cgi/home/stephen/code/google-php/helloworld