【发布时间】:2013-05-19 08:01:29
【问题描述】:
我正在尝试使用 php-sdk-gae 中的 hello world 示例包运行 symfony2。
我按照https://developers.google.com/appengine/docs/php/ 中提供的说明进行操作,我可以使用开发控制器运行演示(即:如下配置 app.yaml:
application: helloworld
version: 1
runtime: php
api_version: 1
handlers:
- url: /bundles
static_dir: helloWorld/web/bundles
- url: /favicon.ico
static_files: helloWorld/web/favicon.ico
upload: helloWorld/web/favicon.ico
- url: /.*
script: helloWorld/web/app_dev.php
它工作正常,运行服务器并加载 /hello/World 页面后我可以得到一个 Hello World
但是当我尝试使用生产控制器(app.php 而不是 app_dev.php)运行它时,我得到一个内部服务器错误。
Request URL:http://mysite.local:8080/hello/World
Request Method:GET
Status Code:500 Internal Server Error
唯一的线索是在我启动服务器的控制台窗口中,显示行...
ERROR:root:php failure (255) with:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.4.15
Content-type: text/html
如果我对 app.php 文件进行一些更改,我意识到它可以很好地与以下 AppKernel 加载行配合使用:
$kernel = new AppKernel('prod', true);
$kernel = new AppKernel('dev', false);
$kernel = new AppKernel('dev', true);
但不适用于生产环境的默认配置 ('prod',false)。
我正在使用以下命令启动 GAE 服务器: google_appengine/dev_appserver.py --php_executable_path=/home/jon/php-sdk-gae/php-5.4.15/installdir/bin/php-cgi helloWorld/
我是 GAE 的新手,我想知道在哪里可以找到日志以获取有关此错误的更多信息。
【问题讨论】:
-
请提供您的 app/logs/prod.log 的某些部分。 http 500 应该是由生产中的异常引起的......哪一个?
-
你使用的是哪个版本的 symfony?
-
我使用的是 symfony 2.2
标签: php google-app-engine symfony