https://rt-wiki.bestpractical.com/index.php?title=LockLessSessionsMySQL&feed=atom&action=historyLockLessSessionsMySQL - Revision history2024-03-28T08:57:50ZRevision history for this page on the wikiMediaWiki 1.37.2https://rt-wiki.bestpractical.com/index.php?title=LockLessSessionsMySQL&diff=1849&oldid=prevAdmin: 2 revisions imported2016-04-06T20:14:18Z<p>2 revisions imported</p>
<p><b>New page</b></p><div>If you want RT to use Apache::Session::[[MySQL]] on no-locking mode, you will have to do the followings changes on your RT:<br />
<br />
* Create a file called [[LockLessMySQL]].pm in /path/to/your/rt/local/lib/Apache/Session, if Session folder doesn't exists, first create it (mkdir -p /path/to/your/rt/local/lib/Apache/Session)<br />
<br />
* Add the below content on that file:<br />
<br />
package Apache::Session::LockLessMySQL;<br />
<br />
use strict;<br />
use warnings;<br />
<br />
our $VERSION = '0.01';<br />
<br />
use base qw(Apache::Session);<br />
<br />
use Apache::Session;<br />
use Apache::Session::Lock::Null;<br />
use Apache::Session::Store::MySQL;<br />
use Apache::Session::Generate::MD5;<br />
use Apache::Session::Serialize::Storable;<br />
<br />
sub populate {<br />
my $self = shift;<br />
<br />
$self-&gt;{object_store} = new Apache::Session::Store::MySQL $self;<br />
$self-&gt;{lock_manager} = new Apache::Session::Lock::Null $self;<br />
$self-&gt;{generate} = \&amp;Apache::Session::Generate::MD5::generate;<br />
$self-&gt;{validate} = \&amp;Apache::Session::Generate::MD5::validate;<br />
$self-&gt;{serialize} = \&amp;Apache::Session::Serialize::Storable::serialize;<br />
$self-&gt;{unserialize} = \&amp;Apache::Session::Serialize::Storable::unserialize;<br />
<br />
return $self;<br />
}<br />
<br />
1;<br />
<br />
* If you are in RT &lt;= 3.6<br />
** Edit /path/to/your/rt/share/html/Elements/[[SetupSessionCookie]] and replace "Apache::Session::[[MySQL]]" with "Apache::Session::[[LockLessMySQL]]"<br />
<br />
* If you are in RT &gt; 3.7<br />
** Edit /path/to/your/rt/lib/RT/Interface/Web/Session.pm and replace "Apache::Session::[[MySQL]]" (line 100) with "Apache::Session::[[LockLessMySQL]]"<br />
<br />
* Restart your web server<br />
<br />
Thanks Rus for the hand :-)</div>Admin