Memcache fixes, SessionNone Changes

34 views
Skip to first unread message

Gary Mort

unread,
Feb 20, 2013, 12:51:19 PM2/20/13
to joomla-de...@googlegroups.com
There is a bug in the current memcache session handlers where session handler configuration was changed to use a multi-dimensional array for future migration to multiple servers, but the register function expects the data to be in the prior format.  I originally submitted a much larger session change pull request, but then found out much of what I wrote was not needed - so I've closed it and submitted a new one, 1836 https://github.com/joomla/joomla-platform/pull/1836

It's a small nit, but it would be nice for this functionality to be working.

In addition, I also made a change to JSessionNone and placed that in it's own pull request.   Currently JSessionNone   call ini_set('session.save_handler', 'files');  in it's register method. in 1839 https://github.com/joomla/joomla-platform/pull/1839

After a thorough review, I can see no reason for this function call and it causes systems where PHP has been configured to use a non-file session storage method to break.   PHP extensions for alternate session storage typically use session.save_path to store the uri for the session server, for example with Memcached  http://php.net/manual/en/memcached.sessions.php this ini variable would be something like "sess1:11211, sess2:11211".

By forcing PHP to use file storage, PHP will look for the file sess1:11211,sess2:11211/somefilename - and since that path does not and cannot exist - it breaks.

This appears to be a long standing bug as there are a number of issues for it in the JoomlaCode tracker - however it keeps getting classified as a feature request and then nothing is done.

My best guess continues to be that at some point in time before the usage of the PHP Session Functions, http://php.net/manual/en/ref.session.php Joomla was doing some ini magic to swap session storage so this was needed to revert to the typical default PHP settings.   Now that everything else has migrated to using the Session Functions, this call has no purpose - on sites where PHP is configured to store to files Joomla! will use file storage automatically, and when it is not configured for file storage by not invoking this function Joomla! will work with the new storage.

So that is it, 2 small nits, 2 small fixes - hopefully they will get included now that I've reduced the change scope to a specific bit of affected code.
Reply all
Reply to author
Forward
0 new messages