简体   繁体   中英

ADOdb sessions across two identical servers

I've now spent a significant time troubleshooting this problem. The issue is almost identical to the problem outlined here:

Inconsistent session serialization across servers

I have two identical servers. They both serve an application which uses ADOdb for session handling. Users are constantly switched between the two servers. Since a few days back, I noticed that I'm constantly being asked to log in again and again. I discovered that on one of the servers the session data is stored in the database like so:

h_3gslcPnE2PgRMXlGz3WwIMO8T5dl2QkkZ-Rpuu0P8pz8XxKmgp9y4nwuqlS9uHakcyOZ0IFwny7a7Ahllj0LSrAmvcIKnHBbdxFx2CNpi0xLKHkplFdUuIcMhVdr15uSWWdGddbKBroc0mcnUmqbuyY9q2JCxRJVtUzyBgCr_5G.......

while on the other server, like so:

agent_check%7Cs%3A4%3A%22true%22%3Bselected_language%7Cs%3A2%3A%22it%22%3BPP_visitor_country%7Ca%3A4%3A%7Bs%3A7%3A%22IP_FROM%22%3Bs%3A10%3A%221094102784%22%3Bs%3A5%3A%22IP_TO%22%3Bs%3A10%3A%221094147904%22%3Bs%3A12%3A%22COUNTRY_CODE%22%3Bs%3A2%3A%22US%22%3Bs%3A11%3A%22countryLONG%22%3Bs%3A13%3A%22UNITED%20STATES%22%3B%7Dcustomer%7CO%3A8%3A%22customer%22%3A12%3A%7Bs%3A12%3A%22customers_id%22%3Bi%3A0%3Bs%3A16%3A%22customers_status%22%3Bs%3A1%3A%221%22%3Bs%3A13

I've used this redundant two-server set up for probably two years now and it has always worked perfectly, storing session data according to the second example given above. The PHP code between the two servers is 100% identical. Also, php.ini is the same between the two. The proposed solution given here Inconsistent session serialization across servers doesn't apply in my case - the suhosin settings pertinent to encryption are identical between the two servers. Yet, the session data is stored in two different manners, with each server not understanding the other's representation. I've temporarily downed one of the servers and all traffic is hitting just one of the servers. Any ideas would be greatly appreciated.

On both servers I had suhosin.session.encrypt set to On. I checked this via phpinfo() on both servers. Once I explicitly set it to Off, things began working normally again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM