3
我遵循here 中的說明,以便在Google App Engine中部署symfony項目,但hello world示例在我的本地計算機上無法使用Google App Engine啓動器無論是在雲端(它與XAMPP一起在本地主機上工作)。不適用於Google App Engine啓動器的Symfony項目
的app.yaml文件是:
# Copyright 2015 Google Inc. All Rights Reserved.
application: myprojectid
version: 1
runtime: php55
api_version: 1
threadsafe: true
handlers:
- url: /clear_cache
script: clear_cache.php
login: admin
- url: /.*
script: web/app.php
env_variables:
CACHE_DIR: "gs://#default#/symfony/cache"
LOG_DIR: "gs://#default#/symfony/log"
的config_prod.yml文件是:
# Copyright 2015 Google Inc. All Rights Reserved.
imports:
- { resource: config.yml }
#framework:
# validation:
# cache: apc
doctrine:
dbal:
driver: pdo_mysql
host: null
port: null
dbname: hello
user: root
password: null
unix_socket: /cloudsql/myprojectid:helloworldinstance
charset: UTF8
orm:
auto_generate_proxy_classes: "%kernel.debug%"
auto_mapping: true
metadata_cache_driver: apc
result_cache_driver: apc
query_cache_driver: apc
# Force monolog to use syslog
monolog:
handlers:
syslog:
type: syslog
level: debug
從發射扔日誌中:
2015-08-24 19:59:38 Running command: "['C:\\Python27\\python.exe', 'C:\\Program Files (x86)\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=8080', '--admin_port=8000', 'C:\\xampp\\htdocs\\symfony-standard']"
INFO 2015-08-24 19:59:43,378 devappserver2.py:763] Skipping SDK update check.
INFO 2015-08-24 19:59:43,608 api_server.py:205] Starting API server at: http://localhost:54278
INFO 2015-08-24 19:59:43,612 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2015-08-24 19:59:43,615 admin_server.py:118] Starting admin server at: http://localhost:8000
INFO 2015-08-24 19:59:46,928 module.py:808] default: "HEAD /_ah/gcs/app_default_bucket/symfony/cache/classes.map HTTP/1.1" 404 -
INFO 2015-08-24 19:59:46,954 module.py:808] default: "GET /_ah/gcs/app_default_bucket?delimiter=%2F&max-keys=1000&prefix=symfony%2Fcache%2Fclasses.map HTTP/1.1" 200 139
INFO 2015-08-24 19:59:46,983 module.py:808] default: "HEAD /_ah/gcs/app_default_bucket/symfony/cache/appProdProjectContainer.php HTTP/1.1" 404 -
INFO 2015-08-24 19:59:47,010 module.py:808] default: "GET /_ah/gcs/app_default_bucket?delimiter=%2F&max-keys=1000&prefix=symfony%2Fcache%2FappProdProjectContainer.php HTTP/1.1" 200 139
INFO 2015-08-24 19:59:47,036 module.py:808] default: "HEAD /_ah/gcs/app_default_bucket/symfony/cache HTTP/1.1" 404 -
INFO 2015-08-24 19:59:47,073 module.py:808] default: "GET /_ah/gcs/app_default_bucket?delimiter=%2F&max-keys=1000&prefix=symfony%2Fcache HTTP/1.1" 200 203
INFO 2015-08-24 19:59:47,128 module.py:808] default: "POST /_ah/gcs/app_default_bucket/_ah_is_writable_temp_file HTTP/1.1" 201 -
INFO 2015-08-24 19:59:47,160 module.py:808] default: "HEAD /_ah/gcs/app_default_bucket/symfony/log HTTP/1.1" 404 -
INFO 2015-08-24 19:59:47,181 module.py:808] default: "GET /_ah/gcs/app_default_bucket?delimiter=%2F&max-keys=1000&prefix=symfony%2Flog HTTP/1.1" 200 201
ERROR:root:php failure (255) with:
stdout:
Status: 500 Internal Server Error
X-Powered-By: PHP/5.5.26
Content-type: text/html
INFO 2015-08-24 19:59:47,573 module.py:808] default: "GET/HTTP/1.1" 500 -
似乎是高速緩存和日誌文件夾的權限問題,但我不確定。有任何想法嗎?
感謝。你好世界的例子在你的建議中在雲中工作。但是,當試圖上傳一個常規項目時出現錯誤。 Google App Engine Launcher似乎無法上傳超過10000個文件的項目。我嘗試按照以下指南從存儲庫進行部署https://cloud.google.com/tools/cloud-repositories/docs/cloud-repositories-hosted-repository和https://cloud.google.com/tools/repo /推送部署,但儘管文件已上傳到Google App Engine,但該項目無法使用。是否有任何解決10000文件限制的解決辦法? – Redleafar
這是另一個問題,我建議將靜態文件移動到雲存儲,或者甚至在php.ini文件中使用這個'google_app_engine.allow_include_gs_buckets'指令移動一些PHP庫https://cloud.google.com/appengine/docs/php/googlestorage /高級#using_php_include_and_require –