IIS7 and IIS7.5 lose sessions in high version IE. A new sessionID is generated each time the page is refreshed.

Source: Internet
Author: User
Tags drupal
The test script is php, And the IE version is ie9. Other kernel browsers ff, chrome, and safari do not have this problem. When this problem was found, we made a login page and used $ _ SESSION to determine that ie could not be accessed, and other browsers would be okay. Later I tested printsessio... the test script is php, the IE version is ie9, and other kernel browsers ff, chrome, and safari do not have this problem.
When this problem was found, we made a login page and used $ _ SESSION to determine that ie could not be accessed, and other browsers would be okay.

Then I tested it.print session_id();The value of each page refresh in ie is different. Open d: \ tmp \ session (this is php. the session storage location set in ini). A session file is added every time a refresh occurs. Of course, this file does not exist in other browsers.

Later, we made a temporary solution to set a cookie on the php page.

session_start();setcookie('PHPSESSID',session_id());

It's a temporary solution, ...... The egg continues to hurt, and a drupal is put on the server (win2008 x86 iis7 fastcgi php5.2.17ets). It is often difficult for someone to log on. You don't have to guess. It must have been unable to log on with IE, I don't want to change drupal... I have been searching for answers for months.

Now, the answer is no longer so important. I only hope there is a solution. Please let me know your experience and help me with this lost lamb ..

By the way, I found a person with the same problem as I did on the way to the answer, but I didn't understand the solution, because I certainly did not underline my domain name .. Http://forums.iis.net/t/1150171.aspxplease refer to the instructions for this article.

Attach the packet capture data (hiding the domain name ):
IE:

GET /index.php HTTP/1.1Accept: text/html, application/xhtml+xml, */*Accept-Language: zh-CNUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)Accept-Encoding: gzip, deflateHost: ***.***.cnConnection: Keep-AliveCookie: has_js=1HTTP/1.1 200 OKCache-Control: public, max-age=600Content-Type: text/html; charset=utf-8Content-Language: zh-hansExpires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:54:19 +0000ETag: "1376286859-0"Vary: CookieServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSX-Generator: Drupal 7 (http://drupal.org)X-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:54:37 GMTConnection: keep-aliveContent-Length: 9829POST /?q=front-page&destination=front-page HTTP/1.1Accept: text/html, application/xhtml+xml, */*Referer: http://***.***.cn/index.phpAccept-Language: zh-CNUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)Content-Type: application/x-www-form-urlencodedAccept-Encoding: gzip, deflateHost: ***.***.cnContent-Length: 129Connection: Keep-AliveCache-Control: no-cacheCookie: has_js=1HTTP/1.1 302 RedirectCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=UTF-8Expires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 06:02:32 +0000ETag: "1376287352"Location: http://***.***.cn/?q=front-pageServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSSet-Cookie: SESS6a2ee0acf5e5bd0d9cea678a1bb7540f=S2CFFREDq47DBALxDLxlCVzhqnI98MMm4yHPY_k7dho; expires=Wed, 04-Sep-2013 09:35:57 GMT; path=D:/tmp/cook; domain=.***.***.cn; HttpOnlyX-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 06:02:37 GMTConnection: keep-aliveContent-Length: 155

In firefox:

GET /index.php HTTP/1.1Host: ***.***.cnUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateCookie: Drupal.toolbar.collapsed=0; has_js=1Connection: keep-aliveIf-Modified-Since: Mon, 12 Aug 2013 05:56:10 +0000If-None-Match: "1376286970"HTTP/1.1 200 OKCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=utf-8Content-Language: zh-hansExpires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:56:51 +0000ETag: "1376287011"Server: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Generator: Drupal 7 (http://drupal.org)X-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:56:56 GMTConnection: keep-aliveContent-Length: 18842POST /?q=front-page&destination=front-page HTTP/1.1Host: ***.***.cnUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateReferer: http://***.***.cn/Cookie: Drupal.toolbar.collapsed=0; has_js=1Connection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 129HTTP/1.1 302 RedirectCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=UTF-8Expires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:59:42 +0000ETag: "1376287182"Location: http://***.***.cn/?q=front-pageServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSSet-Cookie: SESS6a2ee0acf5e5bd0d9cea678a1bb7540f=DjNRVBdGXEVPumZnszKG9U8bAP0dHqx5wp8jFhJV81U; expires=Wed, 04-Sep-2013 09:33:07 GMT; path=D:/tmp/cook; domain=.***.***.cn; HttpOnlyX-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:59:47 GMTConnection: keep-aliveContent-Length: 155

Reply content:

The test script is php, And the IE version is ie9. Other kernel browsers ff, chrome, and safari do not have this problem.
When this problem was found, we made a login page and used $ _ SESSION to determine that ie could not be accessed, and other browsers would be okay.

Then I tested it.print session_id();The value of each page refresh in ie is different. Open d: \ tmp \ session (this is php. the session storage location set in ini). A session file is added every time a refresh occurs. Of course, this file does not exist in other browsers.

Later, we made a temporary solution to set a cookie on the php page.

session_start();setcookie('PHPSESSID',session_id());

It's a temporary solution, ...... The egg continues to hurt, and a drupal is put on the server (win2008 x86 iis7 fastcgi php5.2.17ets). It is often difficult for someone to log on. You don't have to guess. It must have been unable to log on with IE, I don't want to change drupal... I have been searching for answers for months.

Now, the answer is no longer so important. I only hope there is a solution. Please let me know your experience and help me with this lost lamb ..

By the way, I found a person with the same problem as I did on the way to the answer, but I didn't understand the solution, because I certainly did not underline my domain name .. Http://forums.iis.net/t/1150171.aspxplease refer to the instructions for this article.

Attach the packet capture data (hiding the domain name ):
IE:

GET /index.php HTTP/1.1Accept: text/html, application/xhtml+xml, */*Accept-Language: zh-CNUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)Accept-Encoding: gzip, deflateHost: ***.***.cnConnection: Keep-AliveCookie: has_js=1HTTP/1.1 200 OKCache-Control: public, max-age=600Content-Type: text/html; charset=utf-8Content-Language: zh-hansExpires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:54:19 +0000ETag: "1376286859-0"Vary: CookieServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSX-Generator: Drupal 7 (http://drupal.org)X-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:54:37 GMTConnection: keep-aliveContent-Length: 9829POST /?q=front-page&destination=front-page HTTP/1.1Accept: text/html, application/xhtml+xml, */*Referer: http://***.***.cn/index.phpAccept-Language: zh-CNUser-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)Content-Type: application/x-www-form-urlencodedAccept-Encoding: gzip, deflateHost: ***.***.cnContent-Length: 129Connection: Keep-AliveCache-Control: no-cacheCookie: has_js=1HTTP/1.1 302 RedirectCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=UTF-8Expires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 06:02:32 +0000ETag: "1376287352"Location: http://***.***.cn/?q=front-pageServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSSet-Cookie: SESS6a2ee0acf5e5bd0d9cea678a1bb7540f=S2CFFREDq47DBALxDLxlCVzhqnI98MMm4yHPY_k7dho; expires=Wed, 04-Sep-2013 09:35:57 GMT; path=D:/tmp/cook; domain=.***.***.cn; HttpOnlyX-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 06:02:37 GMTConnection: keep-aliveContent-Length: 155

In firefox:

GET /index.php HTTP/1.1Host: ***.***.cnUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateCookie: Drupal.toolbar.collapsed=0; has_js=1Connection: keep-aliveIf-Modified-Since: Mon, 12 Aug 2013 05:56:10 +0000If-None-Match: "1376286970"HTTP/1.1 200 OKCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=utf-8Content-Language: zh-hansExpires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:56:51 +0000ETag: "1376287011"Server: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Generator: Drupal 7 (http://drupal.org)X-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:56:56 GMTConnection: keep-aliveContent-Length: 18842POST /?q=front-page&destination=front-page HTTP/1.1Host: ***.***.cnUser-Agent: Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20100101 Firefox/22.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateReferer: http://***.***.cn/Cookie: Drupal.toolbar.collapsed=0; has_js=1Connection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 129HTTP/1.1 302 RedirectCache-Control: no-cache, must-revalidate, post-check=0, pre-check=0Content-Type: text/html; charset=UTF-8Expires: Sun, 19 Nov 1978 05:00:00 GMTLast-Modified: Mon, 12 Aug 2013 05:59:42 +0000ETag: "1376287182"Location: http://***.***.cn/?q=front-pageServer: Microsoft-IIS/7.0X-Powered-By: PHP/5.2.17X-Drupal-Cache: MISSSet-Cookie: SESS6a2ee0acf5e5bd0d9cea678a1bb7540f=DjNRVBdGXEVPumZnszKG9U8bAP0dHqx5wp8jFhJV81U; expires=Wed, 04-Sep-2013 09:33:07 GMT; path=D:/tmp/cook; domain=.***.***.cn; HttpOnlyX-Powered-By: ASP.NETDate: Mon, 12 Aug 2013 05:59:47 GMTConnection: keep-aliveContent-Length: 155

It was my fault that I had fixed my post and finally found out where the problem was.
Because I have misunderstood the meaning of session. cookie_path, a variable in php. ini, and entered it as d: \ tmp, we cannot log in. Now it is normal to change to null.

Add:
session.cookie_pathYessessionValid website domain;
session.save_pathRefers to storagesessionPath of the temporary file.

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.