The problem of PHPsession passing between pages: premise: Use the codeIgniter framework and the session1. PHP's built-in session1. there is no problem on the pure apache server. 2. in Nginx apache mode, there is no problem with pages independent of the codeIgniter framework. 3. in apache mode of Nginx...
PHP session transmission between pages:
Prerequisites: Use the codeIgniter framework and the PHP session
1. There is no problem on the pure apache server
2. In Nginx apache mode, there is no problem with pages independent of the codeIgniter framework
3. in apache mode of Nginx, when a page is placed in the codeIgniter framework, there is a problem with session transmission between pages, that is, one page sets the session, and the other page cannot read the session set on the previous page.
Nginx apache mode: In the LNAMP environment, directly access port 8889, which is basically equivalent to directly accessing apache without Nginx. Use LuManager
In Nginx apache mode, there is no problem with pages independent of the codeIgniter framework.
In apache mode of Nginx, when a page is placed in the codeIgniter framework, there is a problem with session transmission between pages, that is, one page sets the session, and the other page cannot read the session set on the previous page.
Reply content:
PHP session transmission between pages:
Prerequisites: Use the codeIgniter framework and the PHP session
1. There is no problem on the pure apache server
2. In Nginx apache mode, there is no problem with pages independent of the codeIgniter framework
3. in apache mode of Nginx, when a page is placed in the codeIgniter framework, there is a problem with session transmission between pages, that is, one page sets the session, and the other page cannot read the session set on the previous page.
Nginx apache mode: In the LNAMP environment, directly access port 8889, which is basically equivalent to directly accessing apache without Nginx. Use LuManager
In Nginx apache mode, there is no problem with pages independent of the codeIgniter framework.
In apache mode of Nginx, when a page is placed in the codeIgniter framework, there is a problem with session transmission between pages, that is, one page sets the session, and the other page cannot read the session set on the previous page.
In Php, session IDs are transmitted between requests. There are three methods:
- The session id is passed through the cookie header in the http request.
- Pass the session id through the http get request, that is, put the session id in the url parameter
- Pass the session id through the http post request, that is, put the session id in the post data for Transmission
In my blog, I wrote an article describing the nature of php sessions in combination with http-the nature of sessions you must understand.
If you are interested, you can read it carefully. If you find anything inappropriate, you can refer to it in the comment and I will check and correct it. I hope more like-minded friends can share their technical ideas.
Why not put the session content in memcache?
First, this method belongs to a third party, and there is no exception in obtaining sessions between platforms. Second, you can set an accurate expiration time, and the access speed is fast, and the data is not implemented, you don't have to worry about the problems caused by the native session file storage method and the access speed problems in the database. A 64 GB memory server can handle the problem when the traffic is low. I am a little blind man. please correct me.