PHP configuration to enable sessions

前端 未结 2 1470
刺人心
刺人心 2020-12-19 12:27

On our development server, sessions handling works fine. On our production server, it doesnt.

phpinfo on the development server shows:

                       


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 13:04

    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.

提交回复
热议问题