使用symfony2设置php-sdk-gae

jon*_*era 6 php google-app-engine symfony

我正在尝试使用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
Run Code Online (Sandbox Code Playgroud)

它工作正常,我可以在运行服务器和加载/ 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
Run Code Online (Sandbox Code Playgroud)

唯一的线索是在我启动服务器的控制台窗口中,显示了行...

ERROR:root:php failure (255) with:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.4.15
Content-type: text/html
Run Code Online (Sandbox Code Playgroud)

如果我在app.php文件中做了一些更改,我意识到它可以正常使用以下AppKernel加载行:

$kernel = new AppKernel('prod', true);
$kernel = new AppKernel('dev', false);
$kernel = new AppKernel('dev', true);
Run Code Online (Sandbox Code Playgroud)

但不是生产环境的默认配置('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的新手,我想知道在哪里可以找到日志来获取有关此错误的更多信息.

小智 -1

缓存也存在问题。

也许问题是这样的,我在本地主机中尝试了一个具有开发版本的项目,好吧。当它部署到 GAE 时,它会失败。

也许这有帮助。 http://www.ideato.it/planet-ideato/symfony2-su-google-app-engine/