PHP configuration to enable sessions

一个人想着一个人 提交于 2019-11-29 10:54:20
Codemwnci

Taken from http://devzone.zend.com/article/141

There are a couple built-in options for storing session data. The session handler is set in the php.ini under the directive named

session.save_handler

sqlite Optionally, you can store session data in an sqlite database. To do so, use a configuration such as:

session.save_handler = sqlite
session.save_path = /tmp/phpsess.db

mm For high-performance session storage, you can store session data in memory with the mm shared-memory module. You'll need to compile php with the mm module support. Here is a tutorial to configure session handling with mm ( http://www.zend.com/tips/tips.php?id=164&single=1 ). Note that since session date is stored in RAM, you should consider it volatile data, and it's lost with power outage or a reboot.

Note: the link in the above tutorial is outdated. You can retrieve the mm module from the OSSP.org website.

What does the rest of the 'sessions' settings look like on your phpinfo page?

Particularly, what is the value of "session.save_handler" and "session.save_path"?

Here is some more information: http://php.net/manual/en/session.configuration.php

"mm" and "sqlite" are alternative save handlers available for you to use. By default, php uses "files" which will store session data on your local server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!