The session cannot be used in two php versions.

Source: Internet
Author: User

We have installed two php: php5.2.17 and php5.4.2 on one machine, which are mounted to nginx in fcgi (port 9000) and fpm (9056) respectively, yesterday, it was said that the uploaded file would not be uploaded if it was larger than 20 mb. We changed to php. ini, I checked and found that part of the conf file of a website uses port 9000, and the other part uses port 9056. This is obviously incorrect. Obviously, two php files are used at the same time, the configuration of 20 mb only takes effect on php5.4, so it is changed to 9056.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/154U12609-0.png "title =" 11121450_1373940547policyv.png "/>

After a while, the customer said that he could not log on, but he could log on normally on another colleague. However, my login failed. We tested that if he could not log on, he could not read the corresponding session.
We checked for half a day and couldn't figure out why some of them could not log on to the other part.
Finally, we found that the corresponding session file exists, but the username is root, while the username of php5.4 is nobody. Therefore, we changed the user in fpm to root, and the result could not be started, because fpm does not allow the root identity to run.
We finally tried to figure out why this session was created by the root user?
I finally remembered another php5.2). This php uses fcgi and the user is root. I finally understood, users who failed to log on earlier are old users. Their sessions are created by php5.2.17, users who can log on are new users, and their sessions are created by php5.4.
The solution is to delete all sessions.

This article is from "one party has" blog, please be sure to keep this source http://yifangyou.blog.51cto.com/900206/1286431

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.