【发布时间】:2023-03-20 09:51:01
【问题描述】:
我将 Laravel 网站上传到 Google App Engine,但无法登录,因为会话不起作用。
在app/config/cache.php和app/config/session.php,我改了:
'driver' => 'memcached',
但是在cache.php,我看到了:
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| Now you may specify an array of your Memcached servers that should be
| used when utilizing the Memcached cache driver. All of the servers
| should contain a value for "host", "port", and "weight" options.
|
*/
'memcached' => array(
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
),
'host' => '127.0.0.1' 是我的问题的原因还是其他原因?
[更新]当我尝试使用时
'driver' => 'file',
会话文件存储在<bucket-name>/storage/session。会话已创建并存储,但来自Server:Google Frontend 的Response Headers 不包含sessionId。
【问题讨论】:
-
你可能希望在 GAE 入门应用上使用官方 Laravel,它支持基于内存缓存的会话:github.com/GoogleCloudPlatform/laravel
标签: php google-app-engine session laravel memcached