PHP enables multiple Web servers to share session data (session data is written to MySQL database)
First, the origin of the problem
Slightly larger sites, usually have several servers, each server running a different function of the module, the use
PHP saves the session by default is the way to save the file, which is only available on Windows with a small amount of space on the file, but if we adopt Uinx or Liux file system, the file space overhead of such file system is very large, However,
Java web session simple application, Java web session
Java sessions are divided into Cookie and HttpSession.Cookie technology: session data is stored on the browser client.Session technology: Session data is stored on the server.I. The following
first, the origin of the problem Slightly larger sites, there are usually several servers, each server running different functions of the module, the use of different level two domain name, and a strong overall site, the user system is unified, that
Websites with a slightly larger size usually have several servers. each server runs modules with different functions and uses different second-level domain names. The User System of a website with a strong integrity is unified, that is, a user name
I. Problem Origin Websites with a slightly larger size usually have several servers. Each server runs modules with different functions and uses different second-level domain names. The user system of a website with a strong integrity is unified,
This article mainly introduces PHP operation MySQL database and session dialogue method, interested in the friend's reference, I hope to help you.
This article explains how PHP uses MySQL to save session sessions, which are analyzed as follows:
In
PHP saves the session by default is the way to save the file, which is only available on Windows with a small amount of space on the file, but if we adopt Uinx or Liux file system, the file space overhead of such file system is very large, However,
I. problem origin 7O8X8R7o & amp; Z) Y # i3O websites with a slightly larger size usually have several servers. each server runs modules with different functions and uses different second-level domain names, the user system of a comprehensive
PHP allows multiple web servers to share SESSION data (write session data to mysql database) I. websites with a slightly larger problem generally have several servers, each of which runs modules with different functions, different second-level
By default, the PHP session is saved as a file, which can be used only on windows with a low File space overhead, however, if we use a file system on the uinx or liux, the file space overhead of such a file system is very large, but the session must
PHP uses the Session_set_save_handler () function to save the session to the MySQL database
PHP saves the session by default is the way to save the file, which is only available on Windows with a small amount of space on the file, but if we adopt
PHP saves the session by default in the way the file is saved, which is only available on Windows with a very small space overhead, but if we use Uinx or the file system on Liux, the file space overhead of such a file system is very large, However,
PHP memcache Sharing for multi-server session sharing
The use of file-based session access bottlenecks may be in the disk IO operation, so the session to deal with small data volume is not a problem, but if you encounter large data volume of
I. Problem Origin Websites with a slightly larger size usually have several servers. Each server runs modules with different functions and uses different second-level domain names. The user system of a website with a strong integrity is unified,
PHP shares SESSION operations on different servers. I. problem origin 7O8X8R7oZ) Y # i3O websites with a slightly larger size usually have several servers, each of which runs modules with different functions, use different second-level domain names
Websites with a slightly larger size usually have several servers. each server runs modules with different functions and uses different second-level domain names. The User System of a website with a strong integrity is unified, that is, a user name
When the Session technology is used in the system to track users, the default Session processing method is to record the Session information of each user by using files in the Web server. session in ini. save_path: path for creating the session data
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:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.