doupao3662 2014-11-03 02:52
浏览 35

如何在App Engine上配置带有memcache的Laravel?

I uploaded a Laravel website to Google App Engine but cannot login because session does not work.

In app/config/cache.php and app/config/session.php, I changed:

'driver' => 'memcached',

but in cache.php, I see:

/*
|--------------------------------------------------------------------------
| 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),

),

Is 'host' => '127.0.0.1' the cause of my problem or is it something else?

[Update] When I try to use

'driver' => 'file',

and session file is store in <bucket-name>/storage/session. The session was created and stored, but Response Headers from Server:Google Frontend does not contain sessionId.

  • 写回答

1条回答 默认 最新

  • dounei9043 2014-12-30 23:13
    关注

    The Memcache service on Google App Engine is not exactly the same as the standard memcached so you won't be able to run an application such as Laravel directly on App Engine without adapting it to that environment. Specifically, there isn't a hostname or IP or port for you to connect to which exposes the memcached API directly.

    Fortunately, other folks have already done this so you can use the fruits of their labor, namely, take a look at Laravel 4 on Google AppEngine for PHP and the discussion on laravel.io which references the above tutorial and also points to the GAE adapter package for Laravel apps.

    Note that I haven't tried this out but looks like it should work for you; please post follow-up questions on the form where the author posted their work.

    评论

报告相同问题?

悬赏问题

  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
  • ¥15 让node服务器有自动加载文件的功能
  • ¥15 jmeter脚本回放有的是对的有的是错的
  • ¥15 r语言蛋白组学相关问题