Full record of the resolution process of Apache PHP SESSION lost under Windows, apache full record_PHP tutorial

WBOY
Release: 2016-07-13 09:57:36
Original
859 people have browsed it

Full record of the resolution process of Apache PHP SESSION loss under Windows, full record of apache

Today’s work is to migrate a PHP site to a new server.

Create a Windows Server 2008 virtual machine, and stop the net stop http service on it (to avoid competing for port 80), install and configure Apache PHP, migrate the site to the new server, the site opens normally, and Apache PHP runs normally. The connection to MySql Server was normal and everything was fine. I thought that the work would be completed in half an hour, but then the nightmare began.

This site uses single sign-on, and the login process includes JavaScript asynchronous operations, including SOAP calls to Web Services. After logging in, it jumped directly back to the login page without any error message. The following possibilities were considered:

1. Is the account abnormal? Tested on other systems, the account status is normal.

2. Did the JavaScript asynchronous operation fail? Use IE developer tools to track the Javascript return value, and the return value is normal.

3. Did the Web Service call fail? Use Fiddler to track the return value of the Web Service, indicating that the verification has been successful and the local login has been completed.

After repeated tracking and debugging, I began to suspect that the SESSION of the site was lost:

1. JavaScript asynchronous operation failed to set SESSION. Is it because the SESSION ID of synchronous access and asynchronous access are different? This has only happened with asynchronous calls in Flash, will it also happen with JavaScript? The SESSION ID value of output synchronous access and asynchronous access is the same.

2. Create 2 PHP test pages, set SESSION in one page, but cannot read it in the other page. Check the php.ini related settings, it seems normal. Check the session.save_path = "C:/php/tmp" path, but there are no SESSION related files, and the setting does not even include the tmp directory.

The ending is ridiculous. Without the tmp directory, PHP cannot write the SESSION file, and naturally the SESSION is lost. Why is there no tmp directory? Because it is not included in the installation package...my 3 hours.

The above is the entire content of this article. I hope it will be helpful to everyone learning php.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/980226.htmlTechArticleFull record of the resolution process of Apache PHP SESSION loss under Windows, apache full record Today’s work is to migrate a PHP site to New server. Create a Windows Server 2008 virtual machine and...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template