PHP to put the session into the Memcached setting method

Source: Internet
Author: User
Tags ini memcached port number

This article mainly introduced the PHP will session into the Memcached setting method, needs the friend may refer to under

Can modify the php.ini file: 1, modify the code in PHP.ini as follows: Session.save_hander = Memcache;     Session.save_path = "Tcp://host: port number";//For example: Session.save_path = "tcp://";   2, normal access to the value of the session is OK.      You cannot modify the php.ini file: A, dynamically modify the settings in php.ini. The code is as follows: Ini_set (' Session.save_hander ', ' memcache ');   Ini_set (' Session.save_path ', ' tcp:// ');    Description: Ini_set () is only valid for the current PHP page, and will not modify the php.ini file itself, and will not affect other PHP pages.   b, normal access to the value of the session is OK. The main purpose of Memcache and session comparison Memcache is to ease the database pressure and speed up, so it is a stateless data (stateless data: the current data is not tied to a user, such as: Lee's data, Richard can be taken out,   As long as you know the corresponding key value can be the session data is bound to the user and is therefore a stateful data. Memcache security will be memcache into the intranet, with a firewall to prevent external access to memcached data changes frequently, with instability, do not need real-time warehousing, security, low
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.