Problems with session passing between pages

105 2

The issue between the session in the page:
Premise: using codeigniter 's framework, using a session session
1. There's no problem on the pure apache server.
2. There's no problem with the pages outside the codeigniter framework in apache mode of nginx.
3. In the nginx apache mode, place the page in the codeigniter frame, there's a problem with sessions between pages, a page setup session, and another page cannot read to the previous page setup session.

Nginx 's apache mode: under lnamp environment, direct access to 8889 ports, basically equivalent to ignoring nginx direct access to apache. Use lumanager

In nginx apache mode, there's no problem with pages outside the codeigniter framework.

In nginx 's apache mode, there's a problem with the pages in the codeigniter frame, the delivery of sessions between pages, a page setup session, and another page cannot read

2 Answers

122 5

Php is passing a session id between requests, which is just three ways:

  • Passing session id through the cookies header in the http request
  • By passing the session id through http get requests, the session id is placed in the url parameter
  • A session id is passed through the http post request, and the session id is passed in the post data.

I wrote in my blog with http written an article explaining the essence of the php session - you've to know about the essence of the session.

If you're interested, you can read, and if you find anything wrong, you can go out of the comment and I'll check it out. Hope to share technology ideas with more friends.

...