<?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: PHP Session Data Lost Between [Some] Pages</title>
	<atom:link href="http://www.tristanwaddington.com/2009/02/php-session-data-lost-between-some-pages/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tristanwaddington.com/2009/02/php-session-data-lost-between-some-pages/</link>
	<description>Web Development and Strategic Communication</description>
	<lastBuildDate>Mon, 21 Jun 2010 12:37:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: George</title>
		<link>http://www.tristanwaddington.com/2009/02/php-session-data-lost-between-some-pages/comment-page-1/#comment-20</link>
		<dc:creator>George</dc:creator>
		<pubDate>Wed, 20 May 2009 10:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.twaddington.com/?p=202#comment-20</guid>
		<description>Hi. Thanks for this!

I had the same problem and it was very frustrating due to the random and seemingly unpredictable nature of it. Sessions could last anywhere from 20 seconds to 20 minutes.

However in my case the server DID have a valid setting for save_path (it was simply &quot;/tmp&quot; which is quite a normal setting for linux servers) but I was still getting the random loss of session data. After setting the save_path to a local folder near my own home directory as you suggested, the problem went away.

So what causes the problem in the first place? It should be quite acceptable to store session data in temporary folders. It could be that the folder was being prematurely cleansed by some other process, but that wouldn&#039;t explain how, as you also mention, the session data would randomly disappear and then sometimes RE-appear! This to me indicates a file access problem, where the file is still there but unable to be read on occasion. I think that when it comes down to it, if the server is hosting a large number of sites, each of which is running potentially a large number of sessions simultaneously, it becomes a bit too much for the system when all of those processes need access to the same folder at the same time.

It would have been nice if I had received some kind of notification that the session data file could not be read, but hey, perhaps there is a log file somewhere I&#039;m not privy to. It&#039;s not my server after all.

Enough of my waffling! Thanks again for the tip :)</description>
		<content:encoded><![CDATA[<p>Hi. Thanks for this!</p>
<p>I had the same problem and it was very frustrating due to the random and seemingly unpredictable nature of it. Sessions could last anywhere from 20 seconds to 20 minutes.</p>
<p>However in my case the server DID have a valid setting for save_path (it was simply &#8220;/tmp&#8221; which is quite a normal setting for linux servers) but I was still getting the random loss of session data. After setting the save_path to a local folder near my own home directory as you suggested, the problem went away.</p>
<p>So what causes the problem in the first place? It should be quite acceptable to store session data in temporary folders. It could be that the folder was being prematurely cleansed by some other process, but that wouldn&#8217;t explain how, as you also mention, the session data would randomly disappear and then sometimes RE-appear! This to me indicates a file access problem, where the file is still there but unable to be read on occasion. I think that when it comes down to it, if the server is hosting a large number of sites, each of which is running potentially a large number of sessions simultaneously, it becomes a bit too much for the system when all of those processes need access to the same folder at the same time.</p>
<p>It would have been nice if I had received some kind of notification that the session data file could not be read, but hey, perhaps there is a log file somewhere I&#8217;m not privy to. It&#8217;s not my server after all.</p>
<p>Enough of my waffling! Thanks again for the tip <img src='http://www.tristanwaddington.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
