<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Weez.com &#187; sessions</title>
	<atom:link href="http://www.weez.com/tag/sessions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.weez.com</link>
	<description>Solving everyday practical LAMP problems... one at a time</description>
	<lastBuildDate>Sat, 31 Jul 2010 00:12:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How do you use PHP Sessions to prevent forms from being submitted twice?</title>
		<link>http://www.weez.com/2010/06/how-do-you-use-php-sessions-to-prevent-forms-from-being-submitted-twice/</link>
		<comments>http://www.weez.com/2010/06/how-do-you-use-php-sessions-to-prevent-forms-from-being-submitted-twice/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 14:00:46 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[being]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[from]]></category>
		<category><![CDATA[prevent]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[submitted]]></category>
		<category><![CDATA[twice]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/06/how-do-you-use-php-sessions-to-prevent-forms-from-being-submitted-twice/</guid>
		<description><![CDATA[I want to prevent a form from being submitted a second time when a user presses the back button.]]></description>
			<content:encoded><![CDATA[<p>I want to prevent a form from being submitted a second time when a user presses the back button.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/06/how-do-you-use-php-sessions-to-prevent-forms-from-being-submitted-twice/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>12a. Deleting records and using sessions</title>
		<link>http://www.weez.com/2010/05/12a-deleting-records-and-using-sessions/</link>
		<comments>http://www.weez.com/2010/05/12a-deleting-records-and-using-sessions/#comments</comments>
		<pubDate>Sat, 15 May 2010 22:59:01 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[12a.]]></category>
		<category><![CDATA[Deleting]]></category>
		<category><![CDATA[records]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[using]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/05/12a-deleting-records-and-using-sessions/</guid>
		<description><![CDATA[Part 1 of a 3 part tutorial on how to select a record to delete from a mySQL database table, using PHP. This tutorial uses PHP to display all records, then you can select the one to delete. Part 2 has a confirmation page, so uses sessions to store information. Part 3 runs the actual [...]]]></description>
			<content:encoded><![CDATA[<p>					<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/jjcc37bvQvg?fs=1"></param><param name="allowFullScreen" value="true"></param>
					<embed src="http://www.youtube.com/v/jjcc37bvQvg?fs=1" type="application/x-shockwave-flash" width="425" height="355" allowfullscreen="true"></embed></object><br />
Part 1 of a 3 part tutorial on how to select a record to delete from a mySQL database table, using PHP. This tutorial uses PHP to display all records, then you can select the one to delete. Part 2 has a confirmation page, so uses sessions to store information. Part 3 runs the actual delete SQL query.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/05/12a-deleting-records-and-using-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eric Day: Open Source Bridge Database Sessions</title>
		<link>http://www.weez.com/2010/05/eric-day-open-source-bridge-database-sessions/</link>
		<comments>http://www.weez.com/2010/05/eric-day-open-source-bridge-database-sessions/#comments</comments>
		<pubDate>Fri, 07 May 2010 20:07:34 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[Drizzle]]></category>
		<category><![CDATA[Bridge]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Eric]]></category>
		<category><![CDATA[Open]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[Source]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/05/eric-day-open-source-bridge-database-sessions/</guid>
		<description><![CDATA[Open Source Bridge, the &#8220;conference for open source citizens,&#8221; is right around the corner! The sessions were just announced and it&#8217;s going to be packed with quite a variety of really interesting talks. From open cloud computing topics to hardware hacking to language hacks (like HipHop from Facebook), I&#8217;m really looking forward to being there [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://opensourcebridge.org/">Open Source Bridge</a>, the &#8220;conference for open source citizens,&#8221; is right around the corner! The sessions were <a href="http://opensourcebridge.org/blog/2010/04/announcing-the-open-source-bridge-2010-talks/">just announced</a> and it&#8217;s going to be packed with quite a variety of really interesting talks. From open cloud computing topics to hardware hacking to language hacks (like HipHop from Facebook), I&#8217;m really looking forward to being there (I&#8217;m helping organize the event, but hopefully I&#8217;ll have time to attend sessions as well).</p>
<p>I wanted to point out a few of the great database talks:</p>
<ul>
<li><a href="http://opensourcebridge.org/sessions/">State of MariaDB &#8211; Monty Widenius</a></li>
<li><a href="http://opensourcebridge.org/sessions/421">Cassandra: Strategies for Distributed Data Storage &#8211; Kelvin Kakugawa</a></li>
<li><a href="http://opensourcebridge.org/sessions/464">Developing Replication Plugins for Drizzle &#8211; Padraig O&#8217;Sullivan</a></li>
<li><a href="http://opensourcebridge.org/sessions/380">Drizzle, Scaling MySQL for the Future &#8211; Brian Aker</a></li>
<li><a href="http://opensourcebridge.org/sessions/379">SELECT * FROM Internet Using YQL &#8211; Jonathan LeBlanc</a></li>
<li><a href="http://opensourcebridge.org/sessions/360">Introduction to MongoDB &#8211; Michael Dirolf</a></li>
<li><a href="http://opensourcebridge.org/sessions/358">Introduction to PostgreSQL &#8211; Christophe Pettus, Josh Berkus</a></li>
<li><a href="http://opensourcebridge.org/sessions/357">Relational vs. Non-Relational &#8211; Josh Berkus</a></li>
<li><a href="http://opensourcebridge.org/sessions/334">Stacks of Cache &#8211; Duncan Beevers</a></li>
<li><a href="http://opensourcebridge.org/sessions/313">CouchApp Evently Guided Hack w/ CouchDB &#8211; J Chris Anderson</a></li>
</ul>
<p><a href="http://opensourcebridge.org/?ref=2010attend125"><img src="http://opensourcebridge.org/badges/2010/attend125.png" alt="I’m Attending Open Source Bridge – June 1–4, 2010 – Portland, OR" border="" /></a></p>
<p>Beyond the DB talks, I&#8217;m also exited for a few other talks around high performance and high availability, from <a href="http://opensourcebridge.org/sessions/331">Facebook operations</a> to <a href="http://opensourcebridge.org/sessions/367">Rasmus Lerdorf&#8217;s talk</a> on making your PHP applications faster. I&#8217;ll also take the opportunity to shamelessly plug my own talk on writing <a href="http://opensourcebridge.org/sessions/402">high performance multi-core applications</a>. There are also rumors of donut trucks, tesla coils, and scavenger hunts.</p>
<p>You should <a href="http://opensourcebridge.org/attend/">register to attend today</a>, it&#8217;s going to be awesome.</p>
<p>View full post on <a href="http://oddments.org/?p=445">Planet Drizzle</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/05/eric-day-open-source-bridge-database-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pythian Group: Videos of Pythian Sessions from the 2010 O’Reilly MySQL Conference and Expo</title>
		<link>http://www.weez.com/2010/04/pythian-group-videos-of-pythian-sessions-from-the-2010-o%e2%80%99reilly-mysql-conference-and-expo/</link>
		<comments>http://www.weez.com/2010/04/pythian-group-videos-of-pythian-sessions-from-the-2010-o%e2%80%99reilly-mysql-conference-and-expo/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 20:07:14 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[Drizzle]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Expo]]></category>
		<category><![CDATA[from]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[O’Reilly]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/04/pythian-group-videos-of-pythian-sessions-from-the-2010-o%e2%80%99reilly-mysql-conference-and-expo/</guid>
		<description><![CDATA[Here&#8217;s a sneak peek at a video matrix &#8212; this is all the videos that include Pythian Group employees at the MySQL conference. I hope to have all the rest of the videos processed and uploaded within 24 hours, with a matrix similar to the one below (but of course with many more sessions). Title [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a sneak peek at a video matrix &#8212; this is all the videos that include Pythian Group employees at the MySQL conference.  I hope to have all the rest of the videos processed and uploaded within 24 hours, with a matrix similar to the one below (but of course with many more sessions).</p>
<p>
<table>
<tr>
<th>Title</th>
<th>Presenter</th>
<th>Slides</th>
<th>Video link <br />(hr:min:sec)</th>
<th>Details (Conf. site link)</th>
</tr>
<tr>
<th colspan="5"><center>Main Stage</center></th>
</tr>
<tr>
<td>Keynote: Under New Management: Next Steps for the Community</td>
<td>Sheeri K. Cabral (Pythian)</td>
<td>N/A</td>
<td><a href="http://www.youtube.com/watch?v=nKJsvk-aM1s">18:16</a>
</td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/14808">session 14808</a></td>
</tr>
<tr>
<td>Ignite talk: MySQLtuner 2.0</td>
<td>Sheeri K. Cabral (Pythian)</td>
<td><a href="http://technocation.org/files/doc/2010_04_mysqltuner_ignite.pdf">PDF</a></td>
<td><a href="http://www.youtube.com/watch?v=BIeU4q3Ajmw">5:31</a></td>
<td>N/A</td>
</tr>
<tr>
<th colspan="5"><center>Interview</center></th>
</tr>
<tr>
<td>Thoughts on Drizzle and MySQL</td>
<td>Sheeri K. Cabral (Pythian)</td>
<td>N/A</td>
<td><a href="http://www.youtube.com/watch?v=ra9K7CoVMD8">9:22</a></td>
<td>N/A</td>
</tr>
<tr>
<th colspan="5"><center>Tutorials</center></th>
</tr>
<tr>
<td><a name="vars1"></a>MySQL Configuration Options and Files: Basic MySQL Variables (Part 1)</td>
<td>Sheeri K. Cabral (Pythian)
</td>
<td><a href="http://bit.ly/my10vars1">PDF</a>
</td>
<td><a href="http://www.youtube.com/watch?v=RKwfv7FCcWg">1:25:04, pre-break</a></p>
<p><a href="http://www.youtube.com/watch?v=Mn9h7if_bvE">1:35:47, post-break</a></td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12408">session 12408</a></td>
</tr>
<tr>
<td><a name="vars2"></a>MySQL Configuration Options and Files: Intermediate MySQL Variables (Part 2)</td>
<td>Sheeri K. Cabral (Pythian)
</td>
<td><a href="http://bit.ly/my10vars2">PDF</a>
</td>
<td><a href="http://www.youtube.com/watch?v=RKwfv7FCcWg">1:25:04, pre-break</a></p>
<p><a href="http://www.youtube.com/watch?v=WfO0ZpnikRE">1:24:28, post-break</a>
</td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12435">session 12435</a>
</td>
</tr>
<tr>
<th colspan="5"><center>Sessions</center></th>
</tr>
<tr>
<td>Better Database Debugging for Shorter Downtimes</td>
<td>Rob Hamel (Pythian)</td>
<td><a href="http://technocation.org/files/doc/Better_db_debug.pdf">PDF</a></td>
<td><a href="http://www.youtube.com/watch?v=B9JmFGcWE3Y">33:13</a>
</td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13021">session 13021</a></td>
</tr>
<tr>
<td>Find Query Problems Proactively With Query Reviews</td>
</tr>
</table>
<td>Sheeri K. Cabral (Pythian)</td>
<td><a href="http://bit.ly/my10qreview">PDF</a></td>
<td><a href="http://www.youtube.com/watch?v=IGkBzQuRS5E">45:59</a></td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13267">session 13267</a></td>
<tr>
<td>Time Zones and MySQL</td>
<td>Sheeri K. Cabral (Pythian)</td>
<td><a href="http://bit.ly/my10tz">PDF</a></td>
<td><a href="http://www.youtube.com/watch?v=fp-etlirjbo">45:54</a>
</td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12412">session 12412</a></td>
</tr>
<tr>
<td>Security Around MySQL</td>
<td>Danil Zburivsky (The Pythian Group)</td>
<td><a href="http://assets.en.oreilly.com/1/event/36/Security%20Around%20MySQL%20Presentation.odp">ODP</a></td>
<td><a href="http://www.youtube.com/watch?v=kroiQfIAsoM">37:27</a></td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13458">session&nbsp;13458</a></td>
</tr>
<tr>
<td>Continual Replication Sync</td>
<td>Danil Zburivsky (The Pythian Group)</td>
<td><a href="http://assets.en.oreilly.com/1/event/36/Continual%20Replication%20Sync%20Presentation.odp">ODP</a></td>
<td><a href="http://www.youtube.com/watch?v=uShOWftsbd4">45:57</a></td>
<td><a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13428">session 13428</a></td>
</tr>
<p>View full post on <a href="http://www.pythian.com/news/11247/pythian-2010-mysqlconf/">Planet Drizzle</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/04/pythian-group-videos-of-pythian-sessions-from-the-2010-o%e2%80%99reilly-mysql-conference-and-expo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Damaka® Delivers Advanced Sweeping™ Capability of Live Sessions Across Multiple Devices Over WiFi, 3G and 4G Networks</title>
		<link>http://www.weez.com/2010/04/damaka%c2%ae-delivers-advanced-sweeping%e2%84%a2-capability-of-live-sessions-across-multiple-devices-over-wifi-3g-and-4g-networks/</link>
		<comments>http://www.weez.com/2010/04/damaka%c2%ae-delivers-advanced-sweeping%e2%84%a2-capability-of-live-sessions-across-multiple-devices-over-wifi-3g-and-4g-networks/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 17:38:01 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[across]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Capability]]></category>
		<category><![CDATA[Damaka®]]></category>
		<category><![CDATA[Delivers]]></category>
		<category><![CDATA[devices]]></category>
		<category><![CDATA[Live]]></category>
		<category><![CDATA[multiple]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[over]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[Sweeping™]]></category>
		<category><![CDATA[wifi]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/04/damaka%c2%ae-delivers-advanced-sweeping%e2%84%a2-capability-of-live-sessions-across-multiple-devices-over-wifi-3g-and-4g-networks/</guid>
		<description><![CDATA[Damaka® Delivers Advanced Sweeping™ Capability of Live Sessions Across Multiple Devices Over WiFi, 3G and 4G Networks Damaka Sweeping™ technology is supported on iPhone, Android, Windows Mobile, Symbian, Windows PC and Mac platforms Read more on PRWeb via Yahoo! News]]></description>
			<content:encoded><![CDATA[<p><b>Damaka® Delivers Advanced Sweeping™ Capability of Live Sessions Across Multiple Devices Over WiFi, 3G and 4G Networks</b><br />
Damaka Sweeping™ technology is supported on iPhone, Android, Windows Mobile, Symbian, Windows PC and Mac platforms</p>
<p>Read more on <a rel="nofollow" href="http://news.yahoo.com/s/prweb/20100401/bs_prweb/prweb3823684_1">PRWeb via Yahoo! News</a><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/04/damaka%c2%ae-delivers-advanced-sweeping%e2%84%a2-capability-of-live-sessions-across-multiple-devices-over-wifi-3g-and-4g-networks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Tutorials: Sessions</title>
		<link>http://www.weez.com/2010/03/php-tutorials-sessions/</link>
		<comments>http://www.weez.com/2010/03/php-tutorials-sessions/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 17:48:55 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/03/php-tutorials-sessions/</guid>
		<description><![CDATA[Simelar to cookies, sessions store data, but data is destroyed when the connection is lost (ie browser is closed). I show you how to create, show, and unset sessions.]]></description>
			<content:encoded><![CDATA[<p>					<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/5SsMHZ5Nb0k?fs=1"></param><param name="allowFullScreen" value="true"></param>
					<embed src="http://www.youtube.com/v/5SsMHZ5Nb0k?fs=1" type="application/x-shockwave-flash" width="425" height="355" allowfullscreen="true"></embed></object><br />
Simelar to cookies, sessions store data, but data is destroyed when the connection is lost (ie browser is closed). I show you how to create, show, and unset sessions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/03/php-tutorials-sessions/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>How to Build a Community Web Site Part 6 &#8211; Header, Login, &amp; Sessions in Flash PHP Tutorial</title>
		<link>http://www.weez.com/2010/03/how-to-build-a-community-web-site-part-6-header-login-sessions-in-flash-php-tutorial/</link>
		<comments>http://www.weez.com/2010/03/how-to-build-a-community-web-site-part-6-header-login-sessions-in-flash-php-tutorial/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 05:47:29 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Build]]></category>
		<category><![CDATA[Community]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Header]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/03/how-to-build-a-community-web-site-part-6-header-login-sessions-in-flash-php-tutorial/</guid>
		<description><![CDATA[Source and Site Download &#8211; www.webintersect.com Part 6 &#8211; Fixing up the flash header and create the login script, and check user logged in script. How to build a dynamic member based portal or community web site using PHP, mysql, and Flash actionscript 3.0]]></description>
			<content:encoded><![CDATA[<p>					<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/mwUeGtnamfQ?fs=1"></param><param name="allowFullScreen" value="true"></param>
					<embed src="http://www.youtube.com/v/mwUeGtnamfQ?fs=1" type="application/x-shockwave-flash" width="425" height="355" allowfullscreen="true"></embed></object><br />
Source and Site Download &#8211; www.webintersect.com Part 6 &#8211; Fixing up the flash header and create the login script, and check user logged in script. How to build a dynamic member based portal or community web site using PHP, mysql, and Flash actionscript 3.0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/03/how-to-build-a-community-web-site-part-6-header-login-sessions-in-flash-php-tutorial/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Percona sessions at the MySQL conference</title>
		<link>http://www.weez.com/2010/03/percona-sessions-at-the-mysql-conference/</link>
		<comments>http://www.weez.com/2010/03/percona-sessions-at-the-mysql-conference/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 22:41:15 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Percona]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/03/percona-sessions-at-the-mysql-conference/</guid>
		<description><![CDATA[Many Percona employees will be at the 2010 MySQL conference. We&#8217;ll be giving a lot of informative technical talks on various topics. Here&#8217;s a list: Morgan Tocker, Baron Schwartz: Diagnosing and Fixing MySQL Performance Problems Peter Zaitsev: Scaling Applications with Caching, Sharding and Replication Baron Schwartz: EXPLAIN Demystified Vadim Tkachenko: An Overview of Flash Storage [...]]]></description>
			<content:encoded><![CDATA[<p>Many Percona employees will be at the <a href="http://en.oreilly.com/mysql2010/">2010 MySQL conference</a>.  We&#8217;ll be giving a lot of informative technical talks on various topics.  Here&#8217;s a list:</p>
<ul>
<li>Morgan Tocker, Baron Schwartz: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12410" class="url uid">Diagnosing and Fixing MySQL Performance Problems</a></li>
<li>Peter Zaitsev: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12411" class="url uid">Scaling Applications with Caching, Sharding and Replication</a></li>
<li>Baron Schwartz: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12474" class="url uid">EXPLAIN Demystified</a></li>
<li>Vadim Tkachenko: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12465" class="url uid">An Overview of Flash Storage for Databases</a></li>
<li>Matt Yonkovit: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13054" class="url uid">The Five Minute DBA</a></li>
<li>Bill Schuler, Baron Schwartz: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/14392" class="url uid">Performance and Feature Enhancements to MySQL and InnoDB</a></li>
<li>Fernando Ipar: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12489" class="url uid">PHP Object-Relational Mapping Libraries In Action</a></li>
<li>Baron Schwartz: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12479" class="url uid">Read-Write Splitting: Techniques, Challenges, and Solutions</a></li>
<li>Matt Yonkovit, Yves Trudeau: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12685" class="url uid">Choosing the Right Tools for the Job, SQL or NOSQL</a></li>
<li>Vadim Tkachenko, et al: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/14083" class="url uid">Panel: How Solid-state Technologies are Transforming MySQL Server Performance and the Datacenter Architectures</a></li>
<li>Morgan Tocker: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13169" class="url uid">Understanding the Role of IO As a Bottleneck</a></li>
<li>Baron Schwartz: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12477" class="url uid">MySQL Graphing and Trending with Cacti</a></li>
<li>Vadim Tkachenko: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12467" class="url uid">XtraBackup: Hot Backups and More </a></li>
<li>Aleksandr Kuzminsky: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/13339" class="url uid">Recovery of Lost or Corrupted InnoDB Tables</a></li>
<li>Ryan Lowe: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12484" class="url uid">Achieving PCI Compliance with MySQL</a></li>
<li>Yves Trudeau: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12486" class="url uid">How to choose High Availability solutions for MySQL</a></li>
<li>Yasufumi Kinoshita: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12660" class="url uid">How to Fulfil the Potential of InnoDB&#8217;s Performance and Scalability</a></li>
<li>Peter Zaitsev: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12583" class="url uid">Choosing Hardware and Operating Systems for MySQL</a></li>
<li>Peter Zaitsev: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12580" class="url uid">Instrumenting your Application for MySQL and Memcached</a></li>
<li>Peter Zaitsev: <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/12578" class="url uid">InnoDB Architecture and Performance Optimization &#8211; Part 1</a> and <a href="http://en.oreilly.com/mysql2010/public/schedule/detail/14243" class="url uid">InnoDB Architecture and Performance Optimization &#8211; Part 2</a></li>
</ul>
<p>In addition, you&#8217;ll be able to visit us at our booth in the expo hall, where you can play Stump The Experts with your tough problems.  And Daniel Nichter will be staffing the Maatkit booth, so you can ask him all about Maatkit.  If Maatkit is of interest to you, you might also want to attend the Maatkit BoF session.</p>
<p>We look forward to seeing you there.  It&#8217;s going to be a great conference!</p>
<hr noshade style="margin:0;height:1px" />
<p>Entry posted by Baron Schwartz |<br />
      <a href="http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/#comments">No comment</a></p>
<p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/&amp;title=Percona sessions at the MySQL conference" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/&amp;title=Percona sessions at the MySQL conference" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/&amp;title=Percona sessions at the MySQL conference" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/&amp;T=Percona sessions at the MySQL conference" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/&amp;title=Percona sessions at the MySQL conference" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p>
<p>View full post on <a href="http://www.mysqlperformanceblog.com/2010/03/15/percona-sessions-at-the-mysql-conference/">MySQL Performance Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/03/percona-sessions-at-the-mysql-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php 101: Php Finding Keys Within Sessions Using Isset() And_Key_Exists()</title>
		<link>http://www.weez.com/2010/03/php-101-php-finding-keys-within-sessions-using-isset-and_key_exists/</link>
		<comments>http://www.weez.com/2010/03/php-101-php-finding-keys-within-sessions-using-isset-and_key_exists/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 16:23:16 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[And_Key_Exists]]></category>
		<category><![CDATA[Finding]]></category>
		<category><![CDATA[Isset]]></category>
		<category><![CDATA[Keys]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[using]]></category>
		<category><![CDATA[Within]]></category>

		<guid isPermaLink="false">http://www.weez.com/2010/03/php-101-php-finding-keys-within-sessions-using-isset-and_key_exists/</guid>
		<description><![CDATA[&#13; PHP 101: PHP FINDING KEYS WITHIN SESSIONS USING ISSET() AND ARRAY_KEY_EXISTS() Written by: Robert Guida, guidaMedia.com, ©2009. The isset function is a staple utility of PHP to make sure sessions variables exist before accessing them. Unless you are familiar with session variables, even after reading about them on php.net, this lesson will help you [...]]]></description>
			<content:encoded><![CDATA[<p>&#13;</p>
<p><strong>PHP 101: PHP FINDING KEYS WITHIN SESSIONS USING ISSET() AND ARRAY_KEY_EXISTS()</strong></p>
<p>Written by: Robert Guida, <a rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outgoing/article_exit_link');" href="http://www.guidamedia.com/" title="Let">guidaMedia.com</a>, ©2009.</p>
<p>The isset function is a staple utility of PHP to make sure sessions variables exist before accessing them. Unless you are familiar with session variables, even after reading about them on php.net, this lesson will help you gain a better understanding on how to check the existence of a session key.</p>
<p>We will test different uses of isset to see the results. Some you may expect, while others may surprise you. After looking at isset the lesson tests array_key_exists, to show how the function can be utilized in your code. We will look at simple single-depth sessions and multi-dimension sessions. By single-depth session I am referring to a session key that is at the first level, $_SESSION["key"]. I also refer to this key as a parent key, as it can have a sub-key, like $_SESSION["key"]["sub-key"]. I refer to the sub-key as a child key. This is also what I mean by a mult-dimension session, as it has multiple layers.</p>
<p>Just a few notes about the tests: The full test is at the end of the article. You can copy and paste that into you editor and run it. You can also run each test separately. Running the full script provides formatting to easily review the results, while the individual test do not. You will notice that I provide two results for each test, however, only one is possible. I do this because I take more of an experimental approach to explaining the differences to provide a definitive understanding of how to access session keys.</p>
<p>Last note: We are testing sessions, so if you do not already know, this remains set until your session ends; when you close your browser. To avoid having to close the browser a unset function is included, so the key in the session is dropped.</p>
<p><strong>Test 1</strong></p>
<p>This first test examines the typical use of isset. However, test 1a uses isset with a session key that is not set, and 1b sets the key and runs the same test.</p>
<p>echo &#8220;</p>
<p>Test 1a: Testing ISSET on a key at the first level. The key is not set.</p>
<p>&#8220;;<br />if(isset($_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the key PHP is set, however it was never set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the key PHP is not set.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 1b: Testing ISSET on a key at the first level. The key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"] = &#8220;5&#8243;;<br />if(isset($_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the key PHP is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the key PHP is not set, however it is set.</p>
<p>&#8220;;<br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>The results work as you probably expect. Test 1a returns &#8220;No&#8221;, while 1b returns &#8220;Yes&#8221;. 1a returns &#8220;No&#8221; because we have not yet set the key &#8220;PHP_SESSION&#8221;. When it is set for 1b, isset finds the key is set.</p>
<p>So, let&#8217;s continue testing, and see what happens when use isset with a child key that has a value.</p>
<p><strong>Test 2</strong></p>
<p>In this test we look at the results of using ISSET on a child key. We test if the child key is set, as well, if it is not set. Here again we get some expected results.</p>
<p>echo &#8220;</p>
<p>Test 2a: Testing ISSET on a child key. The child key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"]["ISSET"] = &#8220;Setting the child key, &#8216;PHP SESSION ISSET&#8217;&#8221;;<br />if(isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>Yes, it appears the child key is set. The result is the same as test 2a.</p>
<p>&#8220;; <br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 2b: Testing NOT ISSET on a child key. The child key is set.</p>
<p>&#8220;;<br />if(!isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>Yes, it appears the child key is set. The result is the same as test 2b.</p>
<p>&#8220;; <br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>Test 2a results in &#8220;Yes&#8221;, and so does test 2b. This is expected. So why test if not isset? To answer this, lets look at Test 3, and mix it up a little.</p>
<p><strong>Test 3</strong></p>
<p>This test uses the same tests from Test 2, but we unset the child key. Let see what our results are.</p>
<p>echo &#8220;</p>
<p>Test 3a: Testing ISSET on a child key. The child key is not set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"] = &#8220;Setting the parent key PHP SESSION&#8221;;<br />if(isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>Yes, it appears the child key is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 3b: Testing NOT ISSET on a child key. The child key is not set.</p>
<p>&#8220;;<br />if(!isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>Yes, it appears the child key is set.</p>
<p>&#8220;;<br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>The results we get in test 3 are the same as test 2. Why is this? Let&#8217;s look at the definition of the isset function from php.net:</p>
<p>&#8220;Evaluation goes from left to right and stops as soon as an unset variable is encountered.&#8221;</p>
<p>What this means is, the isset function checks the parent key, then it looks for the child key, which is to the right of the parent. Thus, it looks left to right. Since the child key is not set, the search stops, and the isset value for the parent key is returned rather than the child. Since the parent value is set, the result is &#8220;true&#8221;.</p>
<p>Test 2 and 3 shows us that using isset on a child key is not reliable, since the results you get are the same when it is set, as when it is not? This is where array_key_exists come in to the rescue.</p>
<p>Again, to ensure you have a definitive understanding of array_key_exists, we examine different uses of this function. Once done, you should know how to use array_key_exists.</p>
<p><strong>Test 4</strong></p>
<p>This test looks at using array_key_exists on a parent key, and then a child key.</p>
<p>echo &#8220;</p>
<p>Test 4a: Testing ARRAY_KEY_EXISTS on a parent key. The parent key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"]["AKE"] = &#8220;Setting the child key, &#8216;PHP SESSION AKE&#8217;&#8221;;<br />if(array_key_exists(&#8220;PHP_SESSION&#8221;, $_SESSION)){<br />echo &#8220;</p>
<p>Yes, the parent key exists.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 4b: Testing ARRAY_KEY_EXISTS on a child key. The child key is set.</p>
<p>&#8220;;<br />if(array_key_exists(&#8220;AKE&#8221;, $_SESSION)){<br />echo &#8220;</p>
<p>The result is true, but ISSET does not exist at the parent key level.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the child key does not exists because we are searching the wrong level.</p>
<p>&#8220;; <br />}</p>
<p>Test 4a returns true, while test 4b doesn&#8217;t. In order to find the child key, the session and the parent key, $_SESSION["PHP_SESSION"], must be used in the search. The next test shows us how to successfully use array_key_exists.</p>
<p><strong>Test 5</strong></p>
<p>This example shows how to test the session for a child key. By including the parent key in the search, we find the child key.</p>
<p>echo &#8220;</p>
<p>Test 5: Testing ARRAY_KEY_EXISTS on a child key, using the parent key in the search. The child key is set.</p>
<p>&#8220;; <br />if(array_key_exists(&#8220;AKE&#8221;, $_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the child key exists, because we are searching the parent key, PHP SESSION.</p>
<p>&#8220;; <br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}</p>
<p>$string = &#8220;This is a string to see the results when isset and array_key_exists are used on non array type variables, such as <br />a string.&#8221;; <br />echo &#8220;</p>
<p>Test 6a: What happens when we use isset on a string.</p>
<p>&#8220;;<br />if(isset($string)){<br />echo &#8220;</p>
<p>The variable is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 6b: What happens when we use array_key_exists on a string.</p>
<p>&#8220;;<br />if(array_key_exists(&#8220;results&#8221;, $string)){<br />echo &#8220;</p>
<p>The variable is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false. This will result in an error if error_reporting is not set to zero.</p>
<p>&#8220;;<br />}</p>
<p>The result: &#8220;Yes&#8221;. As mentioned, since the parent key is used in the search, the child is found. By adding the parent key, it directs the function to search inside the key.</p>
<p>So, now you may be wondering, what to use, array_key_exists, or isset. It really comes down to efficiency, reliability and choice. See, if you think for consistency sake using array_key_exists is the right choice, there are a few things to challenge that. One is, it appears the industry standard to use is isset. At least in all the code I have seen and worked with, that is the case. So there is a reason for that.</p>
<p>Could it be that if you end up passing a string into an array_key_exists function that the following error will be generated?</p>
<p>Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in Testing_ISSET_AKE_on_SESSIONS.php on line 95</p>
<p>That alone may be a good reason not to solely use array_key_exists. Isset does not throw an error. This test is included in the complete test at the end of the article.</p>
<p>I personally am used to using isset, because it is much easier to type. The only times I uses array_key_exists is when I am testing a child key. My formula, and my conclusion to this lesson is, I use isset whenever possible, but as soon as I need to test a child key, I use array_key_exists.</p>
<p>I hope this has helped you.</p>
<p>Here is the full testing code, or click <a rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outgoing/article_exit_link');" href="http://guidamedia.com/siteResources/guidaMedia/_pageLevelContent/File/php101.session_isset_ake.php" target="_blank" title="PHP FINDING KEYS WITHIN SESSIONS USING ISSET() AND ARRAY_KEY_EXISTS()">here</a> to go the actual PHP code.</p>
<p> &lt;!&#8211;CTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;
<p>&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p> &lt;!&#8211;p
<p>echo &#8220;</p>
<p> PHP FINDING KEYS WITHIN SESSIONS USING<br />ISSET() AND ARRAY_KEY_EXISTS()
<p>&#8220;;</p>
<p>error_reporting(0);<br />echo &#8220;</p>
<p>Test 1a: Testing ISSET on a key at the first level. The key is not set.</p>
<p>&#8220;;<br />if(isset($_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the key PHP is set, however it was never set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the key PHP is not set.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 1b: Testing ISSET on a key at the first level. The key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"] = &#8220;5&#8243;;<br />if(isset($_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the key PHP is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the key PHP is not set, however it is set.</p>
<p>&#8220;;<br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>echo &#8220;</p>
<p>Test 2a: Testing ISSET on a child key. The child key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"]["ISSET"] = &#8220;Setting the child key, &#8216;PHP SESSION ISSET&#8217;&#8221;;<br />if(isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>Yes, it appears the child key is set. The result is the same as test 2a.</p>
<p>&#8220;; <br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 2b: Testing NOT ISSET on a child key. The child key is set.</p>
<p>&#8220;;<br />if(!isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>Yes, it appears the child key is set. The result is the same as test 2b.</p>
<p>&#8220;; <br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>echo &#8220;</p>
<p>Test 3a: Testing ISSET on a child key. The child key is not set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"] = &#8220;Setting the parent key PHP SESSION&#8221;;<br />if(isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>Yes, it appears the child key is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 3b: Testing NOT ISSET on a child key. The child key is not set.</p>
<p>&#8220;;<br />if(!isset($_SESSION["PHP_SESSION"]["ISSET"])){<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>Yes, it appears the child key is set.</p>
<p>&#8220;;<br />}<br />unset($_SESSION["PHP_SESSION"]);</p>
<p>echo &#8220;</p>
<p>Test 4a: Testing ARRAY_KEY_EXISTS on a parent key. The parent key is set.</p>
<p>&#8220;;<br />$_SESSION["PHP_SESSION"]["AKE"] = &#8220;Setting the child key, &#8216;PHP SESSION AKE&#8217;&#8221;;<br />if(array_key_exists(&#8220;PHP_SESSION&#8221;, $_SESSION)){<br />echo &#8220;</p>
<p>Yes, the parent key exists.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 4b: Testing ARRAY_KEY_EXISTS on a child key. The child key is set.</p>
<p>&#8220;;<br />if(array_key_exists(&#8220;AKE&#8221;, $_SESSION)){<br />echo &#8220;</p>
<p>The result is true, but ISSET does not exist at the parent key level.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>No, the child key does not exists because we are searching the wrong level.</p>
<p>&#8220;; <br />}</p>
<p>echo &#8220;</p>
<p>Test 5: Testing ARRAY_KEY_EXISTS on a child key, using the parent key in the search. The child key is set.</p>
<p>&#8220;; <br />if(array_key_exists(&#8220;AKE&#8221;, $_SESSION["PHP_SESSION"])){<br />echo &#8220;</p>
<p>Yes, the child key exists, because we are searching the parent key, PHP SESSION.</p>
<p>&#8220;; <br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}</p>
<p>$string = &#8220;This is a string to see the results when isset and array_key_exists are used on non array type variables, such as <br />a string.&#8221;; <br />echo &#8220;</p>
<p>Test 6a: What happens when we use isset on a string.</p>
<p>&#8220;;<br />if(isset($string)){<br />echo &#8220;</p>
<p>The variable is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false.</p>
<p>&#8220;;<br />}<br />echo &#8220;</p>
<p>Test 6b: What happens when we use array_key_exists on a string.</p>
<p>&#8220;;<br />if(array_key_exists(&#8220;results&#8221;, $string)){<br />echo &#8220;</p>
<p>The variable is set.</p>
<p>&#8220;;<br />}else{<br />echo &#8220;</p>
<p>The result is false. This will result in an error if error_reporting is not set to zero.</p>
<p>&#8220;;<br />}</p>
<p>error_reporting(E_ALL);<br />print_r($_SESSION);<br />unset($_SESSION["PHP_SESSION"]);<br />?&gt;</p>
<div style="margin:5px;padding:5px;border:1px solid #c1c1c1;font-size: 10px;">
<p>Robert Guida has more than fifteen years experience in Web Application Development and Multi-Media. Mr. Guida has extensive experience designing and developing Websites, including database-driven Web applications, and as a Graphic Designer developing concepts and images for the Web, interactive multi-media programs, and print. As well, Mr. Guida has served as a trusted partner for clients providing management and consulting services for Web development projects. He also has provided marketing services that included designing and managing outreach efforts for a non-profit organization. Throughout his career, he has helped design, develop, and deploy cutting-edge applications, such as a sophisticated real-time market research tool that handles on-line data collection and reporting and was used by MSNBC and Fox News for the 2000 Vice-Presidential and Presidential Debates and Conventions.  His expertise in design resulted in the receipt of an Addy Award, granted for a database-driven kiosk he designed and developed.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2010/03/php-101-php-finding-keys-within-sessions-using-isset-and_key_exists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session Stickiness&#8230;A thing of the past</title>
		<link>http://www.weez.com/2008/10/session-stickinessa-thing-of-the-past/</link>
		<comments>http://www.weez.com/2008/10/session-stickinessa-thing-of-the-past/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 05:57:14 +0000</pubDate>
		<dc:creator>Abidoon</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[danga.com]]></category>
		<category><![CDATA[load balancing]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[php.ini]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://www.weez.com/?p=28</guid>
		<description><![CDATA[So ever notice some old sites with domains showing up in your address bar that look something like www1.example.com or www2.example.com? This is usually because the site owners are trying to load balance, in a crude way by making you stick to one particular webserver. Usually the main reason for doing this is because of [...]]]></description>
			<content:encoded><![CDATA[<p>So ever notice some old sites with domains showing up in your address bar that look something like www1.example.com or www2.example.com? This is usually because the site owners are trying to load balance, in a crude way by making you stick to one particular webserver.</p>
<p>Usually the main reason for doing this is because of sessions. For security reasons your browser will not keep you signed in with the same session if you hop subdomains. What this means is that if you logged in on www1.example.com and now go to www2.example.com the browser will consider this as two separate sites and you would have to login again on www2.</p>
<p>People used to play a number of tricks to remove session stickiness such as storing sessions in the db so that they could transparently load balance your session across multiple webservers. However databases due to their inherent nature are often large monolithic beasts that are much slower than some of the alternatives available out there now.</p>
<p>One of these, which I am a fan of, is memcache! The folks over at danga.com have given us one of the most powerful building blocks for creating highly scalable websites.</p>
<p>We can now experience load balancing as it was meant to be!</p>
<p>As an example lets take PHP session handling. PHP usually stores its session on the local hard drive of a server. You can also make it store sessions inside a database, lets say MySQL. However, as I mentioned earlier MySQL is very slow compared to memcache and is inherently harder to scale compared to memcache.</p>
<p>To setup PHP to use memcache for sessions, this is all you have to do :</p>
<p>0 &#8211; Install memcache library available at http://pecl.php.net/package/memcache</p>
<p>1 &#8211; Open php.ini</p>
<p>2 &#8211; Set session.save_handler = memcache</p>
<p>3 &#8211; Set session.save_path = &#8220;tcp://IP:PORT&amp;weight=X&#8221; where X is the weight of a particular memcache server. You can add as many as you like by specifying one after the other separated by a comma.</p>
<p>4 &#8211; Install memcached. For a distribution like Fedora or CentOS just execute &#8220;yum install memcached&#8221;</p>
<p>All of this should not take you more than 5 minutes, and you are done!</p>
<p>Now to scale just keep adding more servers and firing up the memcached daemon  and experience the true beauty of completely transparent load balancing <img src='http://www.weez.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.weez.com/2008/10/session-stickinessa-thing-of-the-past/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
