<?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: New Tutorial: Getting Started with Zend Auth</title>
	<atom:link href="http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Thu, 11 Mar 2010 20:06:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Greg</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9566</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Wed, 25 Apr 2007 18:58:45 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9566</guid>
		<description>It seems that the internal session functionality sets the save_path to be the system default if it is not explicitly set in the php.ini file, but does not change the ini potions. 

When Zend_Session::setOptions attempts to 
  $savePath = ini_get(&#039;session.save_path&#039;);
an empty string is returned.

Like forrest, I had to add an ini_set() in my code.</description>
		<content:encoded><![CDATA[<p>It seems that the internal session functionality sets the save_path to be the system default if it is not explicitly set in the php.ini file, but does not change the ini potions. </p>
<p>When Zend_Session::setOptions attempts to<br />
  $savePath = ini_get('session.save_path');<br />
an empty string is returned.</p>
<p>Like forrest, I had to add an ini_set() in my code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9565</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Wed, 25 Apr 2007 18:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9565</guid>
		<description>Same issue with the save path here. session_start works fine without an error. I can set a variable and see that the /tmp/sess_* file is updated. If I remove that code and try to use Zend_Session it says &quot;Unwritable session.save_path&quot;</description>
		<content:encoded><![CDATA[<p>Same issue with the save path here. session_start works fine without an error. I can set a variable and see that the /tmp/sess_* file is updated. If I remove that code and try to use Zend_Session it says "Unwritable session.save_path"</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: forrest</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9564</link>
		<dc:creator>forrest</dc:creator>
		<pubDate>Wed, 25 Apr 2007 18:30:22 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9564</guid>
		<description>i was having a lot of trouble with the session save path in v.09.  when i set it with:
ini_set(&#039;session.save_path&#039;,&#039;/home/[site]/tmp/&#039;);
it worked fine.</description>
		<content:encoded><![CDATA[<p>i was having a lot of trouble with the session save path in v.09.  when i set it with:<br />
ini_set('session.save_path','/home/[site]/tmp/');<br />
it worked fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9229</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Mon, 09 Apr 2007 12:21:11 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9229</guid>
		<description>Actually, this is at the top of Zend_Session:

&#039;use_only_cookies&#039; =&gt; &#039;on&#039;

I guess that prevents session fixation then.</description>
		<content:encoded><![CDATA[<p>Actually, this is at the top of Zend_Session:</p>
<p>'use_only_cookies' =&gt; 'on'</p>
<p>I guess that prevents session fixation then.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9228</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Mon, 09 Apr 2007 12:17:48 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9228</guid>
		<description>Hi,

Yeah, I noticed regenerateId() later on while looking through it properly. However, it only seems to be automatically called with rememberUntil (i.e. log me in for 2 days rather than just this browser session). Can you see it being used automatically elsewhere?

To prevent session fixation I would have expected Zend_Auth to do it whenever a user logs in, not only when an expiry date is set.

To prevent session hijacking it would have been nice to have Zend_Auth regenerate an id whenever it is used (or maybe every 5 times or something if it&#039;s a big performance hit).

It just seems that if you&#039;re going to have a wrapper for authenticating users then it should do everything that&#039;s needed and not require you to put stuff elsewhere.

Since I&#039;m going to alter the session storage to add a secret key + hash, expire, timeout, ip changes, etc, I&#039;ll make it regenerate ID&#039;s too (or maybe make my own auth class from scratch so I can know 100% what&#039;s going on, I don&#039;t like being fuzzy with security). So none of this is really a problem for me but Zend could have made it more secure from the start (unless, once again, I&#039;ve missed something).</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Yeah, I noticed regenerateId() later on while looking through it properly. However, it only seems to be automatically called with rememberUntil (i.e. log me in for 2 days rather than just this browser session). Can you see it being used automatically elsewhere?</p>
<p>To prevent session fixation I would have expected Zend_Auth to do it whenever a user logs in, not only when an expiry date is set.</p>
<p>To prevent session hijacking it would have been nice to have Zend_Auth regenerate an id whenever it is used (or maybe every 5 times or something if it's a big performance hit).</p>
<p>It just seems that if you're going to have a wrapper for authenticating users then it should do everything that's needed and not require you to put stuff elsewhere.</p>
<p>Since I'm going to alter the session storage to add a secret key + hash, expire, timeout, ip changes, etc, I'll make it regenerate ID's too (or maybe make my own auth class from scratch so I can know 100% what's going on, I don't like being fuzzy with security). So none of this is really a problem for me but Zend could have made it more secure from the start (unless, once again, I've missed something).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9220</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Mon, 09 Apr 2007 05:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9220</guid>
		<description>Kyle,

You are correct regarding session data encryption. 

Zend_Session has a regenerateId() function however. To use it, just put Zend_Session::regenerateId() into your bootstrap and it&#039;ll regenerate the session id every time for you. See &lt;a href=&quot;http://framework.zend.com/manual/en/zend.session.globalsessionmanagement.html#zend.session.regenerateid&quot; rel=&quot;nofollow&quot;&gt;the manual&lt;/a&gt; for further details.

At some point I should really work out what the performance and bandwidth costs are for regenerating the session id every request.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Kyle,</p>
<p>You are correct regarding session data encryption. </p>
<p>Zend_Session has a regenerateId() function however. To use it, just put Zend_Session::regenerateId() into your bootstrap and it'll regenerate the session id every time for you. See <a href="http://framework.zend.com/manual/en/zend.session.globalsessionmanagement.html#zend.session.regenerateid" rel="nofollow">the manual</a> for further details.</p>
<p>At some point I should really work out what the performance and bandwidth costs are for regenerating the session id every request.</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyle</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-9207</link>
		<dc:creator>Kyle</dc:creator>
		<pubDate>Sun, 08 Apr 2007 11:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-9207</guid>
		<description>As far as I can tell, the default Zend_Auth storage method doesn&#039;t encrypt the data in any way does it? What if the session data is stolen off the server? (Like a shared session.save_path on a shared host)

Also, I don&#039;t see anywhere in Zend_Session where it regenerates the session ID. That makes it open to session hijacking.

Unless I&#039;m wrong, I think these issues should be mentioned. People shouldn&#039;t rely 100% on what the Zend Framework supplies them and assume that it&#039;s safe just because it&#039;s from Zend.</description>
		<content:encoded><![CDATA[<p>As far as I can tell, the default Zend_Auth storage method doesn't encrypt the data in any way does it? What if the session data is stolen off the server? (Like a shared session.save_path on a shared host)</p>
<p>Also, I don't see anywhere in Zend_Session where it regenerates the session ID. That makes it open to session hijacking.</p>
<p>Unless I'm wrong, I think these issues should be mentioned. People shouldn't rely 100% on what the Zend Framework supplies them and assume that it's safe just because it's from Zend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-8976</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Tue, 27 Mar 2007 16:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-8976</guid>
		<description>Rob,

Thanks! That did the trick.

-Jeff</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Thanks! That did the trick.</p>
<p>-Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-8970</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Tue, 27 Mar 2007 04:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-8970</guid>
		<description>Jeff,

That&#039;s a PHP issue. In php.ini, the session.save_path setting should be set to a directory that the webserver has write access to.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Jeff,</p>
<p>That's a PHP issue. In php.ini, the session.save_path setting should be set to a directory that the webserver has write access to.</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://akrabat.com/php/new-tutorial-getting-started-with-zend-auth/#comment-8964</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Mon, 26 Mar 2007 22:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://akrabat.com/2007/03/25/new-tutorial-getting-started-with-zend-auth/#comment-8964</guid>
		<description>Rob,

Thanks for the tutorial.  I am having a little trouble getting it to work though:

Fatal error: Uncaught exception &#039;Zend_Session_Exception&#039; with message &#039;Unwritable session.save_path: &#039; in /webservices/sites/default/test/zend/zend_auth/library/Zend/Session.php:212

Do you know, or have a good guess, how to fix this error?  I am using Zend Framework 0.9.1

Thanks,
Jeff</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>Thanks for the tutorial.  I am having a little trouble getting it to work though:</p>
<p>Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Unwritable session.save_path: ' in /webservices/sites/default/test/zend/zend_auth/library/Zend/Session.php:212</p>
<p>Do you know, or have a good guess, how to fix this error?  I am using Zend Framework 0.9.1</p>
<p>Thanks,<br />
Jeff</p>
]]></content:encoded>
	</item>
</channel>
</rss>
