<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Part 3 - making sessions work with database using Zend_Db_Table</title>
	<atom:link href="http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/feed/" rel="self" type="application/rss+xml" />
	<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/</link>
	<description>Series of articles describing step by step building of example php application (web site) based on Zend Framework.</description>
	<pubDate>Tue, 06 Jan 2009 20:42:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: viperx</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-248</link>
		<dc:creator>viperx</dc:creator>
		<pubDate>Wed, 19 Nov 2008 14:35:18 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-248</guid>
		<description>make the path to the css files absolute and it will be ok, so:
&lt;link href="/file.css" ...
instead of 
&lt;link href="file.css" ...</description>
		<content:encoded><![CDATA[<p>make the path to the css files absolute and it will be ok, so:
<link href=&#8221;/file.css&#8221; &#8230;<br />
instead of
<link href=&#8221;file.css&#8221; &#8230;<br /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmed El Talkhawy</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-244</link>
		<dc:creator>Ahmed El Talkhawy</dc:creator>
		<pubDate>Wed, 19 Nov 2008 09:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-244</guid>
		<description>Very good tutorial, i liked it very much.

I have noticed that when i point the browser to
"test" it works as expected and when i point it to "test/" with the trailing slash it removes the CSS styles, why is that ?</description>
		<content:encoded><![CDATA[<p>Very good tutorial, i liked it very much.</p>
<p>I have noticed that when i point the browser to<br />
&#8220;test&#8221; it works as expected and when i point it to &#8220;test/&#8221; with the trailing slash it removes the CSS styles, why is that ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viperx</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-229</link>
		<dc:creator>viperx</dc:creator>
		<pubDate>Wed, 12 Nov 2008 17:12:26 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-229</guid>
		<description>Hi sumbul,
I can't think of a reason why you got redirected to index.. when you open /test or /test/index you should see the test page</description>
		<content:encoded><![CDATA[<p>Hi sumbul,<br />
I can&#8217;t think of a reason why you got redirected to index.. when you open /test or /test/index you should see the test page</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sumbul</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-208</link>
		<dc:creator>sumbul</dc:creator>
		<pubDate>Sat, 01 Nov 2008 10:56:42 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-208</guid>
		<description>Nice post,
It seemed fine till the part 2 but in this part testController is redirecting me to index action instead of its own. Thus, instead of the session values I am getting the index/index.phtml content. It is actually not entering the class "TestController extends Zend_Controller_Action" 
Plz help</description>
		<content:encoded><![CDATA[<p>Nice post,<br />
It seemed fine till the part 2 but in this part testController is redirecting me to index action instead of its own. Thus, instead of the session values I am getting the index/index.phtml content. It is actually not entering the class &#8220;TestController extends Zend_Controller_Action&#8221;<br />
Plz help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viperx</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-146</link>
		<dc:creator>viperx</dc:creator>
		<pubDate>Wed, 10 Sep 2008 06:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-146</guid>
		<description>I don't know, you should try some debugging and see what is wrong. I cannot guess what is your code :(</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know, you should try some debugging and see what is wrong. I cannot guess what is your code <img src='http://zfsite.andreinikolov.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-144</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Tue, 09 Sep 2008 13:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-144</guid>
		<description>I am getting the error below on testing the sessioncontroller. How do i resolve this?

Fatal error:Uncaught exception 'Zend_Session_Exception' with message 'A session namespace object already exists for this namespace(;Default'), and so additional accessors(session namespace objects) for this namespace are permitted' in C:..\library\Zend\Session\Namespace.php:106#0 etc.</description>
		<content:encoded><![CDATA[<p>I am getting the error below on testing the sessioncontroller. How do i resolve this?</p>
<p>Fatal error:Uncaught exception &#8216;Zend_Session_Exception&#8217; with message &#8216;A session namespace object already exists for this namespace(;Default&#8217;), and so additional accessors(session namespace objects) for this namespace are permitted&#8217; in C:..\library\Zend\Session\Namespace.php:106#0 etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goose</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-37</link>
		<dc:creator>goose</dc:creator>
		<pubDate>Fri, 25 Jul 2008 15:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-37</guid>
		<description>@admin:
I just sent you an email</description>
		<content:encoded><![CDATA[<p>@admin:<br />
I just sent you an email</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-36</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 24 Jul 2008 20:21:19 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-36</guid>
		<description>It is strange that you still get the error. When you get it? 

In fact in the new release of Zend Framework (1.6, which is released under RC1 version) we have Zend_Session_SaveHandler_DbTable , which does the job of my class above, and even more. As many things in Zend Framework it is somehow bloated with not so important code to support wide range of behaviour, so for basic usage a simple version of the session save handler like my implementation is still an option.

As for if Zend_Auth class is intefering with the session - yes it is, because after authentication some info is put in the session, but this is the desired behaviour, so it is not the problem. If the code still throws this exception the problem is somewhere in the session handler itself. If you can reproduce the exception with some code please send to me to viperx@andreinikolov.com, so I can investigate it.</description>
		<content:encoded><![CDATA[<p>It is strange that you still get the error. When you get it? </p>
<p>In fact in the new release of Zend Framework (1.6, which is released under RC1 version) we have Zend_Session_SaveHandler_DbTable , which does the job of my class above, and even more. As many things in Zend Framework it is somehow bloated with not so important code to support wide range of behaviour, so for basic usage a simple version of the session save handler like my implementation is still an option.</p>
<p>As for if Zend_Auth class is intefering with the session - yes it is, because after authentication some info is put in the session, but this is the desired behaviour, so it is not the problem. If the code still throws this exception the problem is somewhere in the session handler itself. If you can reproduce the exception with some code please send to me to <a href="mailto:viperx@andreinikolov.com">viperx@andreinikolov.com</a>, so I can investigate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: goose</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-35</link>
		<dc:creator>goose</dc:creator>
		<pubDate>Thu, 24 Jul 2008 13:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-35</guid>
		<description>@admin:
Thank you for the quick reply. I Still get the same error. 

Some background information...I have completed Maugrim's ZF Blog tutorial (http://blog.astrumfutura.com/archives/351-An-Example-Zend-Framework-Blog-Application-Part-1-Introductory-Planning.html)
and I am trying to merge your work with his. I think that the Zend_auth class is interfering with your session stuff. Does this make sense??

Thanks</description>
		<content:encoded><![CDATA[<p>@admin:<br />
Thank you for the quick reply. I Still get the same error. </p>
<p>Some background information&#8230;I have completed Maugrim&#8217;s ZF Blog tutorial (http://blog.astrumfutura.com/archives/351-An-Example-Zend-Framework-Blog-Application-Part-1-Introductory-Planning.html)<br />
and I am trying to merge your work with his. I think that the Zend_auth class is interfering with your session stuff. Does this make sense??</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://zfsite.andreinikolov.com/2008/05/part-3-making-sessions-work-with-database-using-zend_db_table/#comment-34</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 24 Jul 2008 13:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://zfsite.andreinikolov.com/?p=7#comment-34</guid>
		<description>@goose:
about this:
“I also receive this annoying error: Fatal error: Exception thrown without a stack frame in Unknown on line 0″

This happened before the fix for the sessions, if you have downloaded the rar file from this part - part3.rar, the bugfix I think is not implemented there. Since then I have fixed a few issues in the session handler, here is the fixed variant:
&lt;pre lang="php"&gt;
&lt; ?php
 
require_once 'Zend/Session/SaveHandler/Interface.php';
require_once 'My/Session/Data.php';
 
class My_Session_Manager implements Zend_Session_SaveHandler_Interface
{
    /**
     * This is instance of My_Session_data, which extends Zend_Db_Table and manages the database connection
     *
     * @var My_Session_Data
     */
    private static $sessionData;
 
    private static $thisIsOldSession = false;
    private static $originalSessionId = '';
 
    public function open($save_path, $name)
    {
        self::$sessionData = new My_Session_Data();
        return true;
    }
 
    public function close()
    {
        return true;
    }
 
    public function read($id)
    {
        $rows = self::$sessionData-&gt;find($id);
        $row = $rows-&gt;current();
        if ($row)
        {
            self::$thisIsOldSession = true;
            self::$originalSessionId = $id;
            return $row-&gt;session_data;
        }
        else
        {
            return '';
        }
    }
 
    public function write($id, $sessionData)
    {
        $data = array
        (
            'session_data' =&gt; $sessionData,
            't_updated' =&gt; new Zend_Db_Expr('NOW()'),
        );
 
        if (self::$thisIsOldSession &#038;&#038; self::$originalSessionId != $id)
        {
            // session ID is regenerated, so set $thisIsOldSession to false, so we insert new row
            self::$thisIsOldSession = false;
        }
 
        if (self::$thisIsOldSession)
        {
            self::$sessionData-&gt;update
            (
                $data,
                self::$sessionData-&gt;getAdapter()-&gt;quoteInto('session_id = ?', $id)
            );
        }
        else
        {
            //no such session, create new one
            $data['session_id'] = $id;
            $data['t_created'] = new Zend_Db_Expr('NOW()');
            self::$sessionData-&gt;insert($data);
        }
 
        return true;
    }
 
    public function destroy($id)
    {
        self::$sessionData-&gt;delete(self::$sessionData-&gt;getAdapter()-&gt;quoteInto('session_id = ?', $id));
        return true;
    }
 
    public function gc($maxLifetime)
    {
        $maxLifetime = intval($maxLifetime);
        self::$sessionData-&gt;delete("DATE_ADD(t_updated, INTERVAL $maxLifetime SECOND) &lt; NOW()");
        return true;
    }
}
&lt;/pre&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@goose:<br />
about this:<br />
“I also receive this annoying error: Fatal error: Exception thrown without a stack frame in Unknown on line 0″</p>
<p>This happened before the fix for the sessions, if you have downloaded the rar file from this part - part3.rar, the bugfix I think is not implemented there. Since then I have fixed a few issues in the session handler, here is the fixed variant:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #339933;">&lt;</span> ?php
&nbsp;
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'Zend/Session/SaveHandler/Interface.php'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'My/Session/Data.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> My_Session_Manager implements Zend_Session_SaveHandler_Interface
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">/**
     * This is instance of My_Session_data, which extends Zend_Db_Table and manages the database connection
     *
     * @var My_Session_Data
     */</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #990000;">static</span> <span style="color: #000033;">$sessionData</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #990000;">static</span> <span style="color: #000033;">$thisIsOldSession</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #990000;">static</span> <span style="color: #000033;">$originalSessionId</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> open<span style="color: #009900;">&#40;</span><span style="color: #000033;">$save_path</span><span style="color: #339933;">,</span> <span style="color: #000033;">$name</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> My_Session_Data<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> close<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> read<span style="color: #009900;">&#40;</span><span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000033;">$rows</span> <span style="color: #339933;">=</span> self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">find</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000033;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$rows</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">current</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000033;">$row</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            self<span style="color: #339933;">::</span><span style="color: #000033;">$thisIsOldSession</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            self<span style="color: #339933;">::</span><span style="color: #000033;">$originalSessionId</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$id</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #000033;">$row</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">session_data</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">else</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> write<span style="color: #009900;">&#40;</span><span style="color: #000033;">$id</span><span style="color: #339933;">,</span> <span style="color: #000033;">$sessionData</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000033;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span>
        <span style="color: #009900;">&#40;</span>
            <span style="color: #0000ff;">'session_data'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000033;">$sessionData</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'t_updated'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Db_Expr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'NOW()'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>self<span style="color: #339933;">::</span><span style="color: #000033;">$thisIsOldSession</span> <span style="color: #339933;">&amp;&amp;</span> self<span style="color: #339933;">::</span><span style="color: #000033;">$originalSessionId</span> <span style="color: #339933;">!=</span> <span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// session ID is regenerated, so set $thisIsOldSession to false, so we insert new row</span>
            self<span style="color: #339933;">::</span><span style="color: #000033;">$thisIsOldSession</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>self<span style="color: #339933;">::</span><span style="color: #000033;">$thisIsOldSession</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">update</span>
            <span style="color: #009900;">&#40;</span>
                <span style="color: #000033;">$data</span><span style="color: #339933;">,</span>
                self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAdapter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">quoteInto</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session_id = ?'</span><span style="color: #339933;">,</span> <span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">else</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">//no such session, create new one</span>
            <span style="color: #000033;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'session_id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$id</span><span style="color: #339933;">;</span>
            <span style="color: #000033;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'t_created'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Db_Expr<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'NOW()'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">insert</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> destroy<span style="color: #009900;">&#40;</span><span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delete</span><span style="color: #009900;">&#40;</span>self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAdapter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">quoteInto</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'session_id = ?'</span><span style="color: #339933;">,</span> <span style="color: #000033;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> gc<span style="color: #009900;">&#40;</span><span style="color: #000033;">$maxLifetime</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000033;">$maxLifetime</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$maxLifetime</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        self<span style="color: #339933;">::</span><span style="color: #000033;">$sessionData</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">delete</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DATE_ADD(t_updated, INTERVAL $maxLifetime SECOND) &lt; NOW()&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.035 seconds -->
