apache - Configuring PHP Memcached sessions for clustering -
Let me look at some posts about this already but it can not be found to work
I have 2 ubuntu servers, for testing, I have installed the following:
apt-get install memcached apt-get install apache2 apt-get install php5 apt-get install
-m -p 11211 -l 192.168.0.1
Server 2
-m -p 11211 -l 192.168.0.2 My / etc /php5/apache2/php.ini
Server 1
session.save_handler = memcached session.save_path = "192.168.0.1:121211,192.168.0.2:121211" server2
Session.save_handler = memcached session.save_path = "192.168.0.2:121211,192.168.0.1:121211" and / var / www /
My small test on session_start (); Echo is a session session saved_handler: A. a????; Echo is a session session save_path: a. Ini_get (one session session.save_pathâ ????) a????; If (isset ($ _ session ['key'])) {resonance â found key: one. ??? $ _ Session ['key']; } And {$ _SESSION ['key'] = a test; The resonance key is set to: a. ??? $ _ Session ['key']; } This works for every individual server, which means that it saves the session. But I do not get a "copy" session in the opposite server (this starts a new session, it does not make any difference)
I do not really know if I have a WiPoos on the test code or If I am missing an illusion, I have tried the mammesh (AUDD) and the path is to add tcp: //, but the result is accurate
UPDATE:
To be more clear, I want my session to save on both servers. The problem is that it is only saved on their local memkwed, never on the remote. This should work accordingly
post-text itemprop = "text"> Memcache does not copy data to every server You can add additional memory server to memcache Increase storage capacity, but it does not repeat. If you want the functionality you see in repcached ....
Comments
Post a Comment