Windows Apache + PHP session lost resolution process full record, Apache full record
Today's job 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 (avoid scrambling for 80 ports), install the configuration Apache + PHP, migrate the site to the new server, the site is open normally, Apache + PHP is running normally, connect MySQL Server Normal, everything is fine, Ben thought about half an hour to finish the work, followed by the nightmare began.
The site uses single sign-on, and the logon process contains JavaScript asynchronous operations that contain SOAP calls to Web Service. Login but jump back to the login page without any error, consider the following possible:
1, is the account abnormal? In other system tests, the account status is normal.
2. Is JavaScript asynchronous operation failed? Use the IE Developer tool to track the JavaScript return value and return the value to normal.
3. Is the Web service call failing? Tracing the return value of the Web service with fiddler indicates that a local login has been completed with successful validation.
Repeatedly tracking debugging, only to begin to suspect that the site session is missing:
1, JavaScript asynchronous operation set session failed, is it because of synchronous access and asynchronous access to the session ID is different caused? This happens asynchronously in Flash, does JavaScript also? The session ID value for output synchronous access and asynchronous access is the same.
2, Build 2 PHP test page, set the session in one page, but not read on another page. Check php.ini related settings, looks normal, see Session.save_path = "c:/php/tmp" path, but really no session related files, set up the TMP directory is not.
The result is ironic, there is no TMP directory, PHP cannot write to the session file, the natural session is lost. Why there is no TMP directory, because there is no in the installation package ... Me for 3 hours.
The above mentioned is the whole content of this article, I hope to be able to learn PHP to help you.
http://www.bkjia.com/PHPjc/980226.html www.bkjia.com true http://www.bkjia.com/PHPjc/980226.html techarticle Windows Apache + PHP session lost resolution process full record, Apache full record of today's work is to migrate a PHP site to the new server. Create a Windows Server 2008 virtual machine, and ...