dongtan4046 2018-01-03 17:08
浏览 40
已采纳

Google App Engine中的服务器之间的会话灵活的PHP环境

I've just moved my application to a Flexible PHP Google App Engine and quickly found out that sharing sessions between instances didn't work that good. Just refreshing a page showed different session results every time.

I've temporarily solved it by forcing my server in the app.yaml to only use one instance. But this instance is now heavily overloaded.

I've tried to find how solve the sessions between servers and the best info I've found is this: https://github.com/GoogleCloudPlatform/google-cloud-php-datastore/blob/master/DatastoreSessionHandler.php

Although it seems like I have to rewrite a lot of my own and 3rd party scripts if I have to make to edit all scripts where it saves to sessions.

Has anyone found a way of just changing the session handler and not have to change the scripts itself to just store sessions like $_SESSION['foo'] = 'asdf' ?

Many thanks

  • 写回答

2条回答 默认 最新

查看更多回答(1条)

报告相同问题?