Advertisement
joomla + memcached = some session problems
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 25, 2009 10:02 am
joomla + memcached = some session problems
Hi i have some troubles with memcached + joomla. I installed and started memcached => joomla options cache type memcache (write memcache options) and session type - memcache too. Save all options and after cann't login to site and administration. In error log nothing, when i change cache to database i can login, where is the problem?
Advertisement
- joomfriend
- Joomla! Explorer
- Posts: 284
- Joined: Sun Feb 08, 2009 5:10 pm
- Contact:
Re: joomla + memcached = some session problems
Hello serjs,
Check that memcache is installed properly. Installing and setting memcached is a little bit tricky. Yes! memcached MUST be properly configured otherwise your site won't respond well. I suggest you contact your host and let them install and set memcached for you.
Check that memcache is installed properly. Installing and setting memcached is a little bit tricky. Yes! memcached MUST be properly configured otherwise your site won't respond well. I suggest you contact your host and let them install and set memcached for you.
- https://www.adelnipet.com: Adelni Pet - Your Social Pet Network
- https://www.egliseprimitive.org: Christian Website
- https://www.egliseprimitive.org: Christian Website
- vipinsahu
- Joomla! Explorer
- Posts: 311
- Joined: Fri Dec 18, 2009 9:23 am
- Location: India
- Contact:
Re: joomla + memcached = some session problems
hey i think u haven't check the session time ?
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 25, 2009 10:02 am
Re: joomla + memcached = some session problems
Where i must config memcached? I install it, set some options on my rc.d script
command_args="-d -u ${memcached_user} -l myip -L"
In joomla:
Cache Settings
Cache Handler MemoryCache
Persistent Memory Cache Yes
Memory Cache Server myip and port
netstat -a | grep 11211 say memcached worker
echo stats | nc 127.0.0.1 11211 give me some stat
Session Settings
When i set Memory Cached for session, i logoff and after i can't logon.
@vipinsahu, my session time = 30 min as default
command_args="-d -u ${memcached_user} -l myip -L"
In joomla:
Cache Settings
Cache Handler MemoryCache
Persistent Memory Cache Yes
Memory Cache Server myip and port
netstat -a | grep 11211 say memcached worker
echo stats | nc 127.0.0.1 11211 give me some stat
Session Settings
When i set Memory Cached for session, i logoff and after i can't logon.
@vipinsahu, my session time = 30 min as default
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 25, 2009 10:02 am
Re: joomla + memcached = some session problems
UPD
When i set error layout for max, i hove some warn's on my log file.
When i set error layout for max, i hove some warn's on my log file.
Code: Select all
Notice: MemcachePool::delete() [memcachepool.delete]: Server 127.0.0.1 (tcp 11211, udp 0) failed with: CLIENT_ERROR bad command line format. Usage: delete <key> [noreply] (0) in /home/site/data/www/example.org/libraries/joomla/session/storage/memcache.php on line 209
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/site/data/www/example.org/libraries/joomla/session/storage/memcache.php:209) in /home/site/data/www/example.org/libraries/joomla/session/session.php on line 423
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/site/data/www/example.org/libraries/joomla/session/storage/memcache.php:209) in /home/site/data/www/example.org/libraries/joomla/session/session.php on line 423
Warning: Cannot modify header information - headers already sent by (output started at /home/site/data/example.org/libraries/joomla/session/storage/memcache.php:209) in /home/site/data/www/example.org/libraries/joomla/session/session.php on line 426
- bmkdigital
- Joomla! Intern
- Posts: 70
- Joined: Tue Feb 16, 2010 8:14 am
- Location: UK
- Contact:
Re: joomla + memcached = some session problems
Looks like joomla is having problems using memcached that is then generating a error that is getting out put before the headers.
I'd say you cannot login as it cannot save the session data.
I'd say you cannot login as it cannot save the session data.
http://www.bmkdigital.co.uk bmk Digital - Joomla installs, updates, maintenance and optimization
Signature rules - Literal URLs Only.
Signature rules - Literal URLs Only.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 25, 2009 10:02 am
Re: joomla + memcached = some session problems
And whereis the problem? I wrote some example to work with the sessions with mecache and there everything works. In the case of the joomla session does not work. Not sure what the problem with memcache or its configuration.
- bmkdigital
- Joomla! Intern
- Posts: 70
- Joined: Tue Feb 16, 2010 8:14 am
- Location: UK
- Contact:
Re: joomla + memcached = some session problems
Without seeing some more log I'm not sure, the first line gives some clues as memcached is getting told to delete but does not seem to like how it was asked and suggests it's a client error. If I did not have anything else to go on I would guess at some sort of miss match between the version joomla was written for and the version you have installed.
http://www.bmkdigital.co.uk bmk Digital - Joomla installs, updates, maintenance and optimization
Signature rules - Literal URLs Only.
Signature rules - Literal URLs Only.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 25, 2009 10:02 am
Re: joomla + memcached = some session problems
There is no more error, notice or warn messages on my log file. I have latest joomla on my server and memcached-1.4.4 + PECL/memcache-3.0.4
-
- Joomla! Apprentice
- Posts: 25
- Joined: Thu Feb 26, 2009 9:49 am
Re: joomla + memcached = some session problems
I am seeing the same thing on my Joomla site. I have to edit configuration.php manually before I can log back into my site.serjs wrote:Hi i have some troubles with memcached + joomla. I installed and started memcached => joomla options cache type memcache (write memcache options) and session type - memcache too. Save all options and after cann't login to site and administration. In error log nothing, when i change cache to database i can login, where is the problem?
This same thing happens when I try to use APC as the session manager in Joomla.
Both APC and Memcache are configured and working properly on my server -- but Joomla is not working correctly with either.
This looks like a bug to me.
-
- Joomla! Intern
- Posts: 78
- Joined: Tue Sep 22, 2009 1:03 pm
- Contact:
Re: joomla + memcached = some session problems
It is bug of memcache, install the latest version.
http://code.google.com/p/memcached/wiki/ReleaseNotes144
----------------------------------------------------------------
Fixes
Add partial backwards compatibility for delete with timeout 0
Before version 1.4.0, there was an optional argument to delete that would allow a client to specify that a deleted object should exist in the cache after the deletion occurred such that add operations would fail even though objects did not appear in the cache.
This feature was removed completely in 1.4.0, but a parser bug caused it to slip through. The bug was fixed in 1.4.3. If anyone was attempting to use it legitimately in the 1.4 series, it would simply not work as expected.
The 1.4.4 backwards compatibility change allows specifically the value of 0 (i.e. non-lingering delete), while continuing to reject others. This will satisfy clients that always wish to send a value even when they do not wish the item to linger.
http://code.google.com/p/memcached/wiki/ReleaseNotes144
----------------------------------------------------------------
Fixes
Add partial backwards compatibility for delete with timeout 0
Before version 1.4.0, there was an optional argument to delete that would allow a client to specify that a deleted object should exist in the cache after the deletion occurred such that add operations would fail even though objects did not appear in the cache.
This feature was removed completely in 1.4.0, but a parser bug caused it to slip through. The bug was fixed in 1.4.3. If anyone was attempting to use it legitimately in the 1.4 series, it would simply not work as expected.
The 1.4.4 backwards compatibility change allows specifically the value of 0 (i.e. non-lingering delete), while continuing to reject others. This will satisfy clients that always wish to send a value even when they do not wish the item to linger.
● http://TurnkeyE.com - Web-design, Custom Development, Outsourcing services for Joomla!™
-
- Joomla! Apprentice
- Posts: 25
- Joined: Thu Feb 26, 2009 9:49 am
Re: joomla + memcached = some session problems
The current version supported by Ubuntu is memcached 1.2.8.
-
- Joomla! Intern
- Posts: 78
- Joined: Tue Sep 22, 2009 1:03 pm
- Contact:
Re: joomla + memcached = some session problems
I sure it is possible to find Debian package of Memecache 1.4 and install it to Ubuntu.WillSpencer wrote:The current version supported by Ubuntu is memcached 1.2.8.
Ubuntu is Debian based OS.
● http://TurnkeyE.com - Web-design, Custom Development, Outsourcing services for Joomla!™
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Mar 24, 2010 10:08 am
- Contact:
Re: joomla + memcached = some session problems
Try setting you session cache is database and NOT memcache
It should work.
It should work.
free Joomla Tutorials for everyone http://joomla101.org (ver 1.6.x) joomla tutorials
Let's help spread the word of Joomla. I love it.
Let's help spread the word of Joomla. I love it.
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Dec 17, 2010 10:51 am
Re: joomla + memcached = some session problems
yea i get that but how am i able to do that if i can't login to the administrator anymore?binhle410 wrote:Try setting you session cache is database and NOT memcache
It should work.
i already tried to find it in all the storage .php files but i couldn't find it there
-
- Joomla! Apprentice
- Posts: 25
- Joined: Thu Feb 26, 2009 9:49 am
Re: joomla + memcached = some session problems
Edit your configuration.php file:freeze1992 wrote:yea i get that but how am i able to do that if i can't login to the administrator anymore?binhle410 wrote:Try setting you session cache is database and NOT memcache
It should work.
i already tried to find it in all the storage .php files but i couldn't find it there
Code: Select all
var $cache_handler = 'file';
-
- Joomla! Fledgling
- Posts: 2
- Joined: Fri Dec 17, 2010 10:51 am
Re: joomla + memcached = some session problems
its exact the same in my fileWillSpencer wrote:Edit your configuration.php file:freeze1992 wrote:yea i get that but how am i able to do that if i can't login to the administrator anymore?binhle410 wrote:Try setting you session cache is database and NOT memcache
It should work.
i already tried to find it in all the storage .php files but i couldn't find it thereCode: Select all
var $cache_handler = 'file';
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sun Mar 20, 2011 1:53 pm
Re: joomla + memcached = some session problems
I had the same problem and solved it by editing configuration file with the following setting
var $session_handler = 'database';
var $session_handler = 'database';
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Sep 16, 2011 2:03 am
Re: joomla + memcached = some session problems
It is best to ask your hosting service to reinstall memcached and joomla and that may solve the problem.
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Jun 28, 2012 10:39 pm
Re: joomla + memcached = some session problems
In order to make Joomla to use memcache for session caching you need to manually edit the configuration.php and change the $session_handler from 'database' to 'memcache'
And here is what is missing everywhere, you need to add a new option memcache_settings:
This is a serialized multy-dimentianal array. I use this code to generate the above string:
If you don't add the memcache_settings option your sessions will never work with memcache.
And here is what is missing everywhere, you need to add a new option memcache_settings:
Code: Select all
public $memcache_settings = 'a:3:{s:10:"persistent";s:1:"0";s:11:"compression";s:1:"0";s:7:"servers";a:1:{i:0;a:2:{s:4:"host";s:9:"127.0.0.1";s:4:"port";s:5:"11211";}}}';
Code: Select all
$a = array(
"persistent" => "0",
"compression" => "0",
"servers" => array(
"0" => array(
"host" => "127.0.0.1", "port" => "11211")
)
);
echo(serialize($a));
-
- Joomla! Apprentice
- Posts: 24
- Joined: Wed May 16, 2012 4:41 pm
Re: joomla + memcached = some session problems
Some Joomla sites just might not work well or at all with memcache, particularly sites with third-party add-ons. See:
https://www.cloudaccess.net/about-us/bl ... -site.html
https://www.cloudaccess.net/about-us/bl ... -site.html
Advertisement