<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Custom PHP Session Class</title>
	<atom:link href="http://stephenmcintyre.net/blog/custom-php-session-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephenmcintyre.net/blog/custom-php-session-class/</link>
	<description>Young Scottish Web Designer</description>
	<lastBuildDate>Thu, 24 Nov 2011 19:03:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-15192</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Thu, 24 Nov 2011 19:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-15192</guid>
		<description>It was a placeholder for the session ID should you want to add a function to fetch it outside of the class.

It is however currently redundant, so I&#039;ve removed it from the class. Thanks.</description>
		<content:encoded><![CDATA[<p>It was a placeholder for the session ID should you want to add a function to fetch it outside of the class.</p>
<p>It is however currently redundant, so I&#8217;ve removed it from the class. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-15191</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Thu, 24 Nov 2011 18:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-15191</guid>
		<description>The original post from Richard did this well. &lt;a href=&quot;http://www.richardwillars.com/articles/php/storing-sessions-in-the-database/&quot; rel=&quot;nofollow&quot;&gt;http://www.richardwillars.com/articles/php/storing-sessions-in-the-database/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>The original post from Richard did this well. <a href="http://www.richardwillars.com/articles/php/storing-sessions-in-the-database/" rel="nofollow">http://www.richardwillars.com/articles/php/storing-sessions-in-the-database/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gersom</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-11451</link>
		<dc:creator>gersom</dc:creator>
		<pubDate>Wed, 21 Sep 2011 17:39:45 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-11451</guid>
		<description>I would like to you this, but I am curently using MySQL instead of MySQLi. I also use a database handler class. Is it wise to rewrite your class for this purpuse, or is it better to switch to MySQLi ?</description>
		<content:encoded><![CDATA[<p>I would like to you this, but I am curently using MySQL instead of MySQLi. I also use a database handler class. Is it wise to rewrite your class for this purpuse, or is it better to switch to MySQLi ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-9024</link>
		<dc:creator>Jared</dc:creator>
		<pubDate>Thu, 28 Jul 2011 02:07:23 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-9024</guid>
		<description>What is $id used for - I see it referenced in the read method, but can not see it actually being used.</description>
		<content:encoded><![CDATA[<p>What is $id used for &#8211; I see it referenced in the read method, but can not see it actually being used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-8863</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Tue, 19 Jul 2011 19:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-8863</guid>
		<description>Thanks, I&#039;ve updated the class.</description>
		<content:encoded><![CDATA[<p>Thanks, I&#8217;ve updated the class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-8860</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Tue, 19 Jul 2011 16:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-8860</guid>
		<description>One note.  On the clean function, you&#039;re using the column sesh_last_accessed rather than just last_accessed</description>
		<content:encoded><![CDATA[<p>One note.  On the clean function, you&#8217;re using the column sesh_last_accessed rather than just last_accessed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freddy</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-8712</link>
		<dc:creator>Freddy</dc:creator>
		<pubDate>Fri, 15 Jul 2011 19:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-8712</guid>
		<description>Good stuff, it&#039;s a good base class to start with and modify until something custom you really need(if need be of course).

The main change I did when using it is convert it so that it&#039;s a singleton class, this way no matter at which depth of the application you&#039;re writing, you always get the same session object throughout the lifetime of that one script.  That way it makes it easier to not have to pass around the session object the whole time. 

Just thought I&#039;d throw that in there. 

Thanks again</description>
		<content:encoded><![CDATA[<p>Good stuff, it&#8217;s a good base class to start with and modify until something custom you really need(if need be of course).</p>
<p>The main change I did when using it is convert it so that it&#8217;s a singleton class, this way no matter at which depth of the application you&#8217;re writing, you always get the same session object throughout the lifetime of that one script.  That way it makes it easier to not have to pass around the session object the whole time. </p>
<p>Just thought I&#8217;d throw that in there. </p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-7532</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Fri, 10 Jun 2011 15:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-7532</guid>
		<description>I ran this script again with your example and it definitely works for me across multiple pages.

&lt;ol&gt;
&lt;li&gt;Is the row being removed from your database?: Make sure you&#039;re not calling &lt;code&gt;$session-&gt;delete()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Is the data field being cleared to empty in the database row?: Make sure you&#039;re not calling &lt;code&gt;$_SESSION = array()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Is the data staying in the table, but the values are being changed?: Check you&#039;re not setting &lt;code&gt;$_SESSION[&#039;logged_in&#039;]&lt;/code&gt; etc. to something different on page two.&lt;/li&gt;
&lt;/ol&gt;

I would check the three cases above for anything familiar.</description>
		<content:encoded><![CDATA[<p>I ran this script again with your example and it definitely works for me across multiple pages.</p>
<ol>
<li>Is the row being removed from your database?: Make sure you&#8217;re not calling <code>$session->delete()</code>.</li>
<li>Is the data field being cleared to empty in the database row?: Make sure you&#8217;re not calling <code>$_SESSION = array()</code>.</li>
<li>Is the data staying in the table, but the values are being changed?: Check you&#8217;re not setting <code>$_SESSION['logged_in']</code> etc. to something different on page two.</li>
</ol>
<p>I would check the three cases above for anything familiar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen McIntyre</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-7531</link>
		<dc:creator>Stephen McIntyre</dc:creator>
		<pubDate>Fri, 10 Jun 2011 15:13:21 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-7531</guid>
		<description>In SQL, the &quot;does not equal&quot; syntax is &lt;&gt; and not != perhaps this is your problem.</description>
		<content:encoded><![CDATA[<p>In SQL, the &#8220;does not equal&#8221; syntax is <> and not != perhaps this is your problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wes</title>
		<link>http://stephenmcintyre.net/blog/custom-php-session-class/comment-page-1/#comment-7530</link>
		<dc:creator>Wes</dc:creator>
		<pubDate>Fri, 10 Jun 2011 15:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://stephenmcintyre.net/?p=378#comment-7530</guid>
		<description>Is there a way to completely dump all sessions?  I tried doing it outside of your class (ie DELETE FROM `sessions` WHERE `id` != &#039;&#039;), but it simply doesn&#039;t work.  I&#039;ve also tried adding a dump() function to your class using ($r = $this-&gt;dbc-&gt;query(&quot;DELETE FROM `sessions` WHERE `id` != &#039;&#039;&quot;)) but still nothing.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Is there a way to completely dump all sessions?  I tried doing it outside of your class (ie DELETE FROM `sessions` WHERE `id` != &#8221;), but it simply doesn&#8217;t work.  I&#8217;ve also tried adding a dump() function to your class using ($r = $this-&gt;dbc-&gt;query(&#8220;DELETE FROM `sessions` WHERE `id` != &#8221;&#8221;)) but still nothing.  Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

