gae php helloworld在gce debian和centos实例上给出了本地服务器的白屏

时间:2013-12-11 12:03:47

标签: php google-app-engine google-compute-engine centos6

我正在尝试在gce debian和/或gce centos实例上运行gae php hellowrold。 https://developers.google.com/appengine/docs/php/gettingstarted/helloworld

helloworld示例在gce debian和gce centos系统上运行时会生成PHP的白屏死机。每个实例都是在过去48小时内创建的新版本。

我的最新版本是centos所以我将描述这个环境。

的Python:

[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 ~]$ 

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]$ 

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]$ 

启动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

服务器启动正常:

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 -

当我点击服务器时,我得到200响应,但是当我访问服务器时

http://localhost:8080/ 

我唯一看到的是可怕的PHP死白屏幕。

似乎开发服务器没有任何错误记录。

我的代码: helloworld.php

<?php
   echo 'Hello, World!';

的app.yaml

application: helloworld
version: 1
runtime: php
api_version: 1

handlers:
- url: /.*
  script: helloworld.php

我非常密切地遵循了指示;在这一点上,我最了解他们。

任何见解或建议将不胜感激。

1 个答案:

答案 0 :(得分: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